jquery_ref_effects
jQuery Effect Methods Reference
Section titled “jQuery Effect Methods Reference”Built-in Animation Effects
Section titled “Built-in Animation Effects”jQuery provides a range of methods for creating visual effects and animations on HTML elements. Note that for many common animations, CSS transitions and animations can offer better performance and hardware acceleration.
| Method | Description |
|---|---|
.hide() | Hides the selected elements. Can accept duration and a callback. |
.show() | Shows the selected elements. Can accept duration and a callback. |
.toggle() | Toggles the visibility (show/hide) of selected elements. Can accept duration and a callback. |
.fadeIn() | Fades in the selected elements (adjusts opacity from 0 to 1). Can accept duration and a callback. |
.fadeOut() | Fades out the selected elements (adjusts opacity from 1 to 0). Can accept duration and a callback. |
.fadeToggle() | Toggles between fading in and fading out. Can accept duration and a callback. |
.fadeTo() | Adjusts the opacity of selected elements to a specific value. Requires duration and opacity value, can accept a callback. |
.slideDown() | Slides down (reveals) the selected elements by animating height. Can accept duration and a callback. |
.slideUp() | Slides up (hides) the selected elements by animating height. Can accept duration and a callback. |
.slideToggle() | Toggles between sliding down and sliding up. Can accept duration and a callback. |
.animate() | Performs a custom animation of a set of CSS properties. Requires properties object, can accept duration, easing, and a callback. |
.stop() | Stops the currently running animation on the selected elements. Optional arguments control clearing the queue and completing the current animation. |
.delay() | Sets a delay (in milliseconds) before the next item in the animation queue is executed. |
.finish() | Stops the current animation, removes all queued animations, and completes all animations for the selected elements. |
.queue() | Shows or manipulates the queue of functions to be executed on the selected elements. |
.dequeue() | Executes the next function on the queue for the selected elements. |
.clearQueue() | Removes all items from the queue that have not yet been run. |