Revision: 55242
Updated Code
at July 11, 2013 16:25 by thewickedchemist
Updated Code
function dropdown_menu() { $("#sub-menu-id a, .subnav a"); $(" #sub-menu-id ").css({ display: "none", opacity: "1" }); // fix for opera browser $("#sub-menu-id li").each(function () { var $subNav = jQuery(this).find('ul:first'); $(this).hover(function () { $subNav.stop().css({ overflow: "hidden", height: "auto", display: "none" }).slideDown(350, function () { $(this).css({ overflow: "visible", height: "auto" }); }); }, function () { $subNav.stop().slideUp(350, function () { $(this).css({ overflow: "hidden", display: "none" }); }); }); }); } //USAGE <script> jQuery(document).ready(function () { dropdown_menu(); }); </script>
Revision: 55241
Updated Code
at January 31, 2012 10:46 by thewickedchemist
Updated Code
function dropdown_menu() { $("#sub-menu-id a, .subnav a"); $(" #sub-menu-id ").css({ display: "none", opacity: "1" }); // fix for opera browser $("#sub-menu-id li").each(function() { var $subNav = jQuery(this).find('ul:first'); $(this).hover(function() { $subNav.stop().css({ overflow: "hidden", height: "auto", display: "none" }).slideDown(350, function() { $(this).css({ overflow: "visible", height: "auto" }); }); }, function() { $subNav.stop().slideUp(350, function() { $(this).css({ overflow: "hidden", display: "none" }); }); }); }); } //USAGE <script> jQuery(document).ready(function(){ dropdown_menu(); }); </script>
Revision: 55240
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at January 31, 2012 10:37 by thewickedchemist
Initial Code
function dropdown_menu() { $("#navigation a, .subnav a"); $(" #navigation ul ").css({ display: "none", opacity: "1" }); // fix for opera browser $("#navigation li").each(function() { var $subNav = jQuery(this).find('ul:first'); $(this).hover(function() { $subNav.stop().css({ overflow: "hidden", height: "auto", display: "none" }).slideDown(350, function() { $(this).css({ overflow: "visible", height: "auto" }); }); }, function() { $subNav.stop().slideUp(350, function() { $(this).css({ overflow: "hidden", display: "none" }); }); }); }); }
Initial URL
http://www.design-ninja.net
Initial Description
Simple solution to add dropdowns quickly to any site.
Initial Title
JQuery Sub-Menu Function
Initial Tags
jquery
Initial Language
jQuery