php - Object motion and action simulation Javascript -
how simulate motion of images , actions here? http://kak-iskat.ru/?q=how+to+do+that
use jquery animate()
$('.my_element').animate({"0px", left: "0px"}, 2000, function (s) { // animation finished }); this animate element top left of screen.
you can position of element want animate element using position()
p = $(".other_element").position(); $('.my_element').animate({top: p.top + "px", left: p.left + "px"}, 2000, function (s) { // animation finished });
Comments
Post a Comment