 <p>Add some class("children") to the <code>ul</code> container which contain all the child <code>li</code> and try this code.</p> <pre><code>$('#one').live('click', function(){ $('ul.children li:not(.uno)').slideUp(); $('ul.children li.uno').slideToggle(); return false; }); $('#two').live('click', function(){ $('ul.children li:not(.dos)').slideUp(); $('ul.children li.dos').slideToggle(); return false; }); $('#three').live('click', function(){ $('ul.children li:not(.trees)').slideUp(); $('ul.children li.trees').slideToggle(); return false; }); </code></pre> <p><strong><a href="http://jsfiddle.net/ANhJq/2/" rel="nofollow">Demo</a></strong></p>