• I have the latest WP, theme and have deactivated all plugins but still can’t get the mobile menu to work.

    The hamburger icon appears but it won’t open when clicked.

    Don’t know what else to do? site is at: kobiclinic.com.au

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter goviral

    (@goviral)

    Update:

    – enabled debug and got no js error messages

    – found other thread (https://www.ads-software.com/support/topic/twenty-fifteen-mobile-menu-not-working/#post-9194722) didn’t get resolved in forum but the OP got it fixed using following code:

    current code (https://pastebin.com/cu100UiN): <button class=”secondary-toggle”><?php _e( ‘Menu and widgets’, ‘twentyfifteen’ ); ?></button>

    amended code on other site (https://pastebin.com/KPcvwnE0): <button class=”secondary-toggle” aria-expanded=”false” aria-controls=”secondary”>Menu and Widgets</button>

    – tried adding the code with aria-expanded but no luck with menu. Is there something else I need to do with this code to make it work?

    Thanks for any help. It’s driving me nuts!

    I’m having a similar issue. The hamburger works but my two flyout nav options just don’t work on mobile.

    https://mobiletest.me/iphone_5_emulator/?u=https://paragusit.com

    Thread Starter goviral

    (@goviral)

    I got this working by adding the Custom CSS and JS plugin and then adding the following code to the JS section:

    /* Add your JavaScript code here.
                         
    If you are using the jQuery library, then don't forget to wrap your code inside jQuery.ready() as follows:
    
    jQuery(document).ready(function( $ ){
        // Your code in here 
    });
    
    End of comment */ 
    
    window.addEventListener("load", function(){
     	var button = document.getElementsByClassName("secondary-toggle");
        button[0].addEventListener("click", function(){
          var mobileNav = document.getElementById("secondary");
          
          if(mobileNav.style.display == "none" || mobileNav.style.display == ""){
          	mobileNav.style.display = "block";
          }else {
          	mobileNav.style.display = "none";
          }
    	});
    });

    Hope this helps. Let me know if any issues.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Mobile Menu not working on Twenty Fifteen Theme’ is closed to new replies.