Very simple one effect plug-in, but not often used, afraid to forget, later in use to see the document, so now write down the notes, convenient later
Copy Code code as follows:
<script>
$ (function () {
$.easing.def= "Easeinquad";/set Default effect
var callback=function () {
Alert ("OK");
}
$ ("#t1"). Animate ({
"Top": 600
},{duration:3000,
Easing: "Easeinquad",//Can be omitted
Complete:callback})
})
</script>
After using the easing, the original method of JQ is not available, and the object is substituted for the time in JQ, which is the following example
{duration:3000,easing: "Easeinquad", Complete:callback}
The callback function of the original JQ is replaced by complete
If you do not use easing, which means that the time parameter is not replaced by the above object, preserve the original function
That is, you can still use the following load easing
Copy Code code as follows:
<script>
var callback=function () {
Alert ("OK");
}
$ ("#t1"). Hide (3000,callback)
</script>
Effects page: http://gsgd.co.uk/sandbox/jquery/easing/
Specific parameter details:
Duration option:
Number of milliseconds
Complete option:
Call when finished
Easing option:
Jswing
Def
Easeinquad
Easeoutquad
Easeinoutquad
Easeincubic
Easeoutcubic
Easeinoutcubic
Easeinquart
Easeoutquart
Easeinoutquart
Easeinquint
Easeoutquint
Easeinoutquint
Easeinsine
Easeoutsine
Easeinoutsine
Easeinexpo
Easeoutexpo
Easeinoutexpo
Easeincirc
Easeoutcirc
Easeinoutcirc
Easeinelastic
Easeoutelastic
Easeinoutelastic
Easeinback
Easeoutback
Easeinoutback
Easeinbounce
Easeoutbounce
Easeinoutbounce