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

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -