December 2013
Intermediate to advanced
384 pages
9h 54m
English
var position = $("#element").offset(); $("#element").animate({top:position.top+10, top:position.left+100}, 1000);
Another dynamic that is good to animate is repositioning of elements—specifically, moving an element from one location to another. Users hate it when they do something and page elements suddenly appear in a different location. Animating the move allows users to see where things go and make the necessary adjustments in their thinking.
To apply move animations, you will be animating changes to the top and left CSS properties. To animate movement vertically, you use top, and to animate horizontally, you use left. For example, the following statements animate moving an ...
Read now
Unlock full access