Simple to use jQuery Easing.js plugin
== Description: == easing is a jquery plugin, and use it to create a more colorful animation.
== Environment: == easing is because jQuery plug-in, it must be re-introduced after the introduction of jquery it
Simple wording
$(".car").animate({"left": "150%"}, 4000, "easeInElastic", function() {});
复制代码
easing: format json, {duration: duration, easing: transition effect, complete: after successful callback}
Example:
$(element).animate({
height:500,
width:600
},{
easing: 'easeInOutQuad',
duration: 500,
complete: function(){}
});
复制代码
Common values of easing as follows:
- linear
- swing
- easeInQuad
- easeOutQuad
- easeInOutQuad
- easeInCubic
- easeOutCubic
- easeInOutCubic
- easeInQuart
- easeOutQuart
- easeInOutQuart
- easeInQuint
- easeOutQuint
- easeInOutQuint
- easeInExpo
- easeOutExpo
- easeInOutExpo
- easeInSine
- easeOutSine
- easeInOutSine
- easeInCirc
- easeOutCirc
- easeInOutCirc
- easeInElastic
- easeOutElastic
- easeInOutElastic
- easeInBack
- easeOutBack
- easeInOutBack
- easeInBounce
- easeOutBounce
- easeInOutBounce
Different worth Icon:
Reproduced in: https: //juejin.im/post/5cfbb1edf265da1bbd4b6771