Revising the jQuery Drop Down
May 3, 2008 4 comments
This post is in reference to the jquery drop down menu tutorial .
Someone emailed me asking if the menu could truely slide in , vertically, not how it is now with the slide on a slight angle ( using jquery’s show / hide ). Its very easy to alter the existing code to make it truely slide.
Instead of using jQuery’s show and hide functions, we just use slideDown and slideUp in replace of them. So the jQuery looks like this..
$(document).ready(function(){
$("#drop_down").hide();
$("#drop_down").animate({
opacity:0.5
});
$("a:contains('Google')").click(function() {
$("#drop_down").slideDown("slow");
});
$("#drop_down").mouseout(function(){
$(this).slideUp("slow");
});
});

