I\'m using a simple easing animation given here using JQUERY EASING PLUGIN
i.e.easing a div from left:200 to left:0 and back.(last example on above page)
I have
You can use the ':animated' pseudo-selector to find out if an element is currently in motion:
if ($('#div1').is(':animated')) {
// do something
}
http://api.jquery.com/animated-selector/
You can also try the step
option to check when div2 should start animate:
$('#div1').animate({
left:0
},{
step: function() {
// check distance and animate div2 when it reaches 100
}
});
http://api.jquery.com/animate/