jquery Plugin easing dynamic menu _jquery

Source: Internet
Author: User
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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.