jquery Summary 06-animated Event 01-Underlying display and hide

Source: Internet
Author: User

Animated events

. Hide (option) animation hides the original property value of the element

$ ("#a2"). Hide ({

duration:3000,
Complete:function () {
Alert (' Perform 3000ms animation complete ')
}
})

. Show (option) animated display

The show and hide methods are modified by the display property, which is required by the Visibility property layout to be set separately through the CSS method

If you use!important in your style, such as Display:none!important, if you want the. Show () method to work correctly, you must use. css (' Display ', ' Block!important ') to override the style
If show and hide become an animation, the default animation changes the height, height, and transparency of the element.

. Toggle (option) hides or displays the toggle intrinsic principle or the use of. Hide () and. Show ()

$ ("Button:last"). Click (function () {
$ (". Right"). Toggle (3000);
});

jquery Summary 06-animated Event 01-Underlying display and hide

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.