Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi,
    It’s a nice idea that could help many others.
    Could you share your solution?
    Thx

    vincentperrin.com

    Hi,
    This solution was already the original code for me, so I had to look for a fast and simple solution by myself and I post it here to help those who faced the same bug as me.
    You can inject a bit of javascript in header.php to toggle the ul menu tag:
    – go to the wp editor for header.php
    – find
    <button class=”menu-toggle”><?php _e( ‘Menu’, ‘twentytwelve’ ); ?></button>
    – just add a bit of javascript as follows:
    <button class=”menu-toggle” onclick=”el = document.getElementById(‘menu-menu-principal’); el.style.display = (el.style.display != ‘inline’ ? ‘inline’ : ‘none’);”><?php _e( ‘Menu’, ‘twentytwelve’ ); ?></button>

    vincentperrin.com

    I had the same issue, the “solution” was already the original code, so I had to look for a fast and simple solution by myself.
    You can inject a bit of javascript in header.php to toggle the ul menu tag:
    – go to the wp editor for header.php
    – find
    <button class="menu-toggle"><?php _e( 'Menu', 'twentytwelve' ); ?></button>
    – just add a bit of javascript as follows:
    <button class="menu-toggle" onclick="el = document.getElementById('menu-menu-principal'); el.style.display = (el.style.display != 'inline' ? 'inline' : 'none');"><?php _e( 'Menu', 'twentytwelve' ); ?></button>

    Cheers!
    vincentperrin.com

Viewing 3 replies - 1 through 3 (of 3 total)