jQuery effect
1: Show hidden
1.1: show() display
show([speed,[easing],[fn]])
speed: predetermined speed, slow, normal, fast, 1000ms
easing: (Optional) Used to specify the switching effect, the default is "swing", the available parameter is "linear"
fn: callback function, the function executed when the animation is completed, each function is executed once
1.2: hide() hide
hide([speed,[easing],[fn]])
Same display
1.3: toggle() switch
toggle([speed,[easing],[fn]])
Same display
Diagonal hidden, no parameters in general
2: Sliding effect
2.1: slideDown() slide down
slideDown([speed,[easing],[fn]])
speed: predetermined speed, slow, normal, fast, 1000ms
easing: (Optional) Used to specify the switching effect, the default is "swing", the available parameter is "linear"
fn: callback function, the function executed when the animation is completed, each function is executed once
2.2: slideUp() slide up
slideUp([speed,[easing],[fn]])
Swipe down
2.3 : slideToggle ()
slideToggle([speed,[easing],[fn]])
Swipe down
3: Event switching
hover([over,]out)
- over: the function to be triggered when the mouse is moved to the element (equivalent to mouseenter)
- out: The function to be triggered when the mouse moves out of the element (equivalent to mouseleave)
- If only one function is written, it will be triggered when the mouse passes and leaves
4: Clear animation in animation queue
stop()
Must be written before the animation
5: Fade in and fade out effect
5.1: fadeIn() fade in
fadeIn([speed,[easing],[fn]])
The parameter description is the same as above
5.2: fadeOut() fade out
fadeOut([speed,[easing],[fn]])
5.3: fadeToggle() fade in and fade out effect switching
fadeToggle([speed,[easing],[fn]])
5.4: Progressively adjust to the specified opacity
fadeTo([[speed],opacity,[easing],[fn]])
- opacity The transparency must be written, and the value is between 0 and 1.
- speed: A string of one of three predetermined speeds ("slow", "normal", or "fast") or a millisecond value representing the duration of the animation (for example: 1000). Must write
- easing: (Optional) Used to specify the switching effect, the default is "swing", and the parameter "linear" is available.
- fn: callback function, a function to be executed when the animation is completed, executed once for each element.
6: animate() custom animation
animate(params,[speed],[easing],[fn])
- params: The style attribute you want to change, passed as an object, must be written. The attribute name does not need to be quoted, if it is a compound attribute, it needs to adopt the camel case naming borderLeft. The remaining parameters can be omitted.
- speed: A string of one of three predetermined speeds ("slow", "normal", or "fast") or a millisecond value representing the duration of the animation (for example: 1000).
- easing: (Optional) Used to specify the switching effect, the default is "swing", and the parameter "linear" is available.
- fn: callback function, a function to be executed when the animation is completed, executed once for each element.
[Talking] Not all styles can be animatedly changed (styles without intermediate values cannot be animatedly changed)