jQuery effects change the visibility, opacity, position, or numeric CSS properties of elements over time. The full jQuery build includes the core effects methods. jQuery UI adds a larger set of named effects and color animation.
Start with these methods before moving to the larger jQuery UI effect collection.
Display or hide elements, with optional duration and callbacks.
Switch between shown and hidden states with one method.
Reveal or hide elements by animating opacity.
Alternate between fading an element in and out.
Animate an element to a specific opacity.
Hide or reveal content with a vertical sliding transition.
Alternate between slide-up and slide-down states.
Animate numeric CSS properties and use callbacks for sequences.
Animate supported color properties through jQuery UI.
Most core effect methods accept a duration such as "slow", "fast", or a number of milliseconds. When you need code to run after an effect finishes, pass a completion callback.
$("#notice").fadeOut(400, function () {
console.log("Fade complete");
});
jQuery UI adds named effects such as bounce, blind, shake, highlight, and transfer. Load jQuery first and then jQuery UI. Current examples in this section use the jQuery UI 1.14.x line.
<link rel="stylesheet" href="https://code.jquery.com/ui/1.14.2/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-4.0.0.min.js"></script>
<script src="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js"></script>
Demo: compare the jQuery UI effects →
Reveal or hide content with a blind-style effect.
Move an element with repeated bounce motion.
Reveal or hide by clipping from an edge or center.
Combine movement and opacity in a directional drop.
Split the element visually into pieces while hiding or showing it.
Fold an element along horizontal and vertical dimensions.
Use the jQuery UI fade effect with effect options.
Temporarily emphasize an element with a background-color transition.
Scale and fade an element together.
Repeatedly fade an element in and out.
Resize an element by a percentage.
Move an element back and forth.
Animate an element from its current dimensions to target dimensions.
Show or hide an element by sliding it in a chosen direction.
Animate an outline from one element to another.
show(), hide(), or toggle() when visibility is the main goal.animate() for numeric CSS-property animation.← jQuery tutorial home · Start with show() and hide() →
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.