 <p>Just add this line:</p> <pre><code>$('[class^=menu]').hide('fadeIn'); </code></pre> <p>Like this:</p> <pre><code>$(document).ready(function () { //hide all dropdown menus $("#pageHeadings div[class^=menu]").hide(); $("#pageHeadings div[id^=heading]").click(function () { // $(this).find('[class^=menu]').hide(); if (!$(this).find('[class^=menu]').is(":visible")) { $('[class^=menu]').hide('fadeIn'); $(this).find('[class^=menu]').slideToggle("fast"); } }); }); </code></pre> <p>That will hide all others before toggling the current one.</p> <p><a href="http://jsfiddle.net/YGQ83/7/" rel="nofollow"><strong>Demo</strong></a></p>