Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="mm-trigger">
- <button class="mm-button"></button>
- </div>
- <nav id="mobile-menu" class="menu-top-container">
- <ul id="menu-top-1" class="mm-menu">
- <li id="menu-item-4614" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home current-menu-item page_item page-item-2725 current_page_item menu-item-4614">
- <a href="" aria-current="page">Home</a></li>
- ...
- </ul></nav>
- <script type='text/javascript'>
- (function($){
- $(document).ready(function(){
- // Mobile Menu
- $(function(){ // run after page loads
- //Switch the "Open" and "Close" state per click then slide up/down (depending on open/close state)
- $(".mm-trigger").click(function(){
- $(this).toggleClass("active").next().slideToggle(500);
- return false; //Prevent the browser jump to the link anchor
- });
- });
- $(window).smartresize(function(){
- if (($(window).width() > 959)) {
- $("#mobile-menu").hide();
- }
- });
- });
- })
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement