$( document ).ready( function() { $( "a.menu_slide" ).click( function() { if ($( this ).parent().children("ul").css('display')=='none') $( this ).parent().children("ul").css('display', 'block'); else $( this ).parent().children("ul").css('display', 'none'); return false; }); });