Fetching contributors…
Cannot retrieve contributors at this time
43 lines (42 sloc) 1.64 KB
<?xml version="1.0"?>
<entry name="effect" type="method" return="jQuery">
<desc>Apply an animation effect to an element.</desc>
<p>The <code>.effect()</code> method applies a named animation <a href="/category/effects/">effect</a> to an element. Many effects also support a show or hide mode, which can be accomplished with the <a href="/show/"><code>.show()</code></a>, <a href="/hide/"><code>.hide()</code></a>, and <a href="/toggle/"><code>.toggle()</code></a> methods.</p>
<argument name="effect" type="String">
<desc>A string indicating which <a href="/category/effects/">effect</a> to use for the transition.</desc>
<argument name="options" type="Object" optional="true">
<desc>Effect-specific properties and <a href="/easings/">easing</a>.</desc>
<xi:include href="../includes/animation-argument-duration.xml" xmlns:xi=""/>
<xi:include href="../includes/animation-argument-complete.xml" xmlns:xi=""/>
<xi:include href="../includes/animation-signature-options.xml" xmlns:xi=""/>
<desc>Apply the bounce effect to a div.</desc>
div {
width: 100px;
height: 100px;
background: #ccc;
border: 1px solid #000;
<p>Click anywhere to apply the effect.</p>
$( document ).click(function() {
$( "div" ).effect( "bounce", "slow" );
<category slug="methods"/>
<category slug="effects"/>
<category slug="effects-core"/>