$( "#toggle1" ).click(function() { $( "#toggle1" ).toggle( "puff" ); }); $( "#toggle2" ).click(function() { $( "#toggle2" ).toggle( "slide" ); });
#toggle1, #toggle2 { width: 100px; height: 100px; background: #ccc; }
<p>Click anywhere to toggle the box.</p> <div id="toggle1"></div> <p>Click anywhere to toggle the box.</p> <div id="toggle2"></div>