Team:UNITN-Trento/JS/Subs/Header
From 2013.igem.org
(Difference between revisions)
(Created page with " //Javascript here $(document).ready(function() { //Open the submenu $("#tn-menu li").mouseenter(function(e) { e.preventDefault(); $(this).children("ul").slideD...") |
(add .stop()) |
||
Line 1: | Line 1: | ||
- | + | //Javascript here | |
- | + | $(document).ready(function() { | |
- | + | //Open the submenu | |
- | + | $("#tn-menu li").mouseenter(function(e) { | |
- | + | e.preventDefault(); | |
- | + | $(this).children("ul").stop().slideDown(); | |
- | + | }); | |
- | + | //Close the submenu | |
- | + | $("#tn-menu li").mouseleave(function(e) { | |
- | + | e.preventDefault(); | |
- | + | $(this).children("ul").stop().slideUp(); | |
- | + | }); | |
- | + | }); |
Revision as of 09:30, 8 July 2013
//Javascript here $(document).ready(function() {
//Open the submenu $("#tn-menu li").mouseenter(function(e) { e.preventDefault(); $(this).children("ul").stop().slideDown(); });
//Close the submenu $("#tn-menu li").mouseleave(function(e) { e.preventDefault(); $(this).children("ul").stop().slideUp(); });
});