hmm, tried these without luck
Code:
$('.block').animate({left: 450}, {duration: 'slow', step: function(){
var b = $(this);
if(b.offset().left + b.width(true) > 400){
b.stop(true, true).animate({left: 0}, 1000);
}
});
Code:
$('.block').animate({left: 450}, {duration: 'slow', step: function(){
var b = $(this);
if(b.offset().left > 400){
b.stop(true, true).animate({left: 0}, 1000);
}
});
Code:
$('.block').animate({left: 450}, {duration: 'slow', step: function(){
var b = $(this);
if(b.offset().left + b.width(true) > 400){
b.stop().animate({left: 0}, 1000);
}
});
Bookmarks