JQuery motion effects and jquery Effects

Source: Internet
Author: User

JQuery motion effects and jquery Effects



JQuery, as a powerful JS framework, has avoided many problems in practice. For example, it does not write algorithms and must be compatible with browsers. Recently, some special effects of JQuery have been used for review.


Common special effects

Fadein ()

Fade in

 

Fadeout ()

Fade out

 

SlideDown ()

Expand down

 

SlideUp ()

Roll up

Complex Effects

Animate

 

 

Stop

 

 

For example, now I want to do this: there is a button on the interface, When you click this button, the div appears, click again, and the div block disappears. Add the fade-in and fade-out effect for the div actions:

 




You can also use the curl effect and specify the time when the action is completed to manually control the action in a more beautiful state.






If it is a move-in event, we can use hover and add two functions for status switching:






However, when we view the effects of the Code in the browser, we will find that if I move the mouse quickly and move it out, it will be repeated several times, even if the mouse leaves, the effect is still there, this is not what we expected. In this case, we can add the stop method to clear the stack effect of the action.






Based on Jquery, it has many advantages over JS, such as webpage element selection, method function, chain operation, element movement, powerful creation, and superb style of methods and events, it seems that the framework is really good ~








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.