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 ~