 <pre><code>$('div.hide').hide(300,function() { // first hide all `.hide` $('#'+ id +'.hide').show(); // then show the element with id `#1` }); </code></pre> <p><em><strong>NOTE: DON'T USE ONLY NUMERIC ID. NOT PERMITTED. <a href="http://stackoverflow.com/questions/7987636/why-cant-i-have-a-numeric-value-as-the-id-of-an-element">READ THIS</a></em></strong></p>