• Resolved graftedin

    (@graftedin)


    Its set to only work on screens smaller than 520. AND this setting is buried in the js rather than allowing this to be adjusted by css.

    If anyone wants to replace this script with their own change your class to hd-menu-toggle or something and then use this script in your footer.

    jQuery( document ).ready( function( $ ) {
    var $masthead = $( ‘#masthead’ ),
    timeout = false;

    $( ‘.hd-menu-toggle’ ).unbind( ‘click’ ).click( function() {
    $masthead.find( ‘.menu-top-main-container’ ).toggle();
    $( this ).toggleClass( ‘toggled-on’ );
    } );

    // Check viewport width when user resizes the browser window.
    $( window ).resize( function() {
    var browserWidth = $( window ).width();

    if ( false !== timeout )
    clearTimeout( timeout );

    timeout = setTimeout( function() {
    $.fn.smallMenu();
    }, 200 );
    } );
    } );

Viewing 1 replies (of 1 total)
  • Thread Starter graftedin

    (@graftedin)

    Eh….I take that back. Try this instead.

    jQuery( document ).ready( function( $ ) {
    var $masthead = $( ‘#masthead’ ),
    timeout = false;

    $( ‘.hd-menu-toggle’ ).unbind( ‘click’ ).click( function() {
    $masthead.find( ‘.menu-top-main-container’ ).toggle();
    $( this ).toggleClass( ‘toggled-on’ );
    } );

    } );

Viewing 1 replies (of 1 total)
  • The topic ‘I found out why the menu toggle doesn't work.’ is closed to new replies.