Template:Team:HokkaidoU Japan/LargeDropDown/JS
From 2014.igem.org
(Difference between revisions)
Line 4: | Line 4: | ||
$(function() { | $(function() { | ||
var $menu = $('#ldd_menu'); | var $menu = $('#ldd_menu'); | ||
+ | var $submenu = $(".ldd_submenu"); | ||
var $child = $menu.children('li'); | var $child = $menu.children('li'); | ||
- | var number = $child.index($child); | + | var $number = $child.index($child); |
- | $child.eq(number).hover(function(){ | + | $child.eq($number).hover(function(){ |
- | $ | + | $submenu.eq($number).slideDown(300); |
} ,function(){ | } ,function(){ | ||
- | $ | + | $submenu.stop(true,true).hide(); |
}); | }); | ||
}); | }); | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 12:17, 5 October 2014