Paths and Easing
There are various paths (curves) and easing which can be applied to our animation. paths will give us the direction of the animation and easing can be used to invert the effects of path. By default, all animation paths are easein.
Paths
Easing
Example 1 - Paths and Easing
Try with different paths and easing with the below example
Result
Example 2
Combining and pipelining animations on an element
JS
HTML
CSS
$.domLoaded(function() { var box = $.get("#box"); $.get("#ani").on("click", function() { // change location box.animate({ to : { x : 200 }, anim : "Location.smooth", duration : 1000, oncomplete : function() { // change height with bounce box.animate({ to : { ht : 200 }, anim : "Dimension.bounce.easeout", duration : 2000 }); // change color box.animate({ to : "#f0f", anim : "Color.smooth", prop : "background-color", duration : 2000, oncomplete : function() { // change border width box.animate({ to : 5, anim : "CSS.smooth.return", prop : "border-width", duration : 1000 }); } }); } }); //change width box.animate({ to : { wid : 400 }, anim : "Dimension.smooth", duration : 1000 }); }); $.get("#reset").on("click", function() { window.location.reload(); }); });
Result
| |||||||||||||||||||||||||||||||||||