Difference between revisions of "Template:HSNU-TAIPEI/nav js"
(Created page with "<html> <script> var menu = $("#main-menu"), showLeft = $(".showLeft"), menuButton = $(".menu-button"), secondLayerList = $(".seclayer"); function toggleMenu() { me...") |
|||
Line 1: | Line 1: | ||
<html> | <html> | ||
+ | |||
<script> | <script> | ||
− | + | $(document).ready(function() { | |
− | + | var layerOpen = false; | |
− | + | $(".next-layer").click(function() { | |
− | + | $( this ).siblings( "li" ).each(function() { | |
− | + | $( this ).children( ".sub-layer" ).hide(); | |
− | function | + | }); |
− | + | $( this ).children( ".sub-layer" ).toggle(); | |
− | + | layerOpen = !layerOpen; | |
− | + | }); | |
− | + | }); | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | ); | + | |
− | + | ||
</script> | </script> | ||
</html> | </html> |
Revision as of 15:44, 28 May 2015