Line 181: | Line 181: | ||
</script> | </script> | ||
− | < | + | <script> |
− | + | $( 'document' ).ready(function() { | |
− | </ | + | $('#cssmenu').prepend('<div id="menu-button">Menu</div>'); |
+ | $('#cssmenu #menu-button').on('click', function(){ | ||
+ | var menu = $(this).next('ul'); | ||
+ | if (menu.hasClass('open')) { | ||
+ | menu.removeClass('open'); | ||
+ | } | ||
+ | else { | ||
+ | menu.addClass('open'); | ||
+ | } | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
</html> | </html> |
Revision as of 14:50, 7 October 2018
Loading, please wait