$("#main > li").hover(function () { $("ul.children", this).next().slideDown(); }, function () { $("ul.children", this).next().slideUp(); });