• Resolved wzshop

    (@wzshop)


    Hi,
    I guess there is a bug in the Jquery dropdown menu of the Minileven theme. When you change the screen orientation it stops working properly.

    Anyone else who encounters this problem? Any fix for this?
    Thanks, Robbert

Viewing 9 replies - 1 through 9 (of 9 total)
  • Where did you get the theme?

    Thread Starter wzshop

    (@wzshop)

    We only support themes from the repository on this site, so you may need to track down the developer of that theme for help…

    Thread Starter wzshop

    (@wzshop)

    Thought it was an theme, originally created by WP?

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Please identify your theme here http://wordpress.org/extend/themes/

    Twentyeleven IS a WP theme – do you have the same issue in twentyeleven or twentytwelve. Also, try deactivating your plugins to see if that changes the issue.

    Thread Starter wzshop

    (@wzshop)

    It is just about the jquery dropdown menu which is not present in twentyeleven theme i guess? I tried deactivating all plugins but the bug still occurs.

    You could see if this provides any more specific info:

    http://codex.wordpress.org/Using_Your_Browser_to_Diagnose_JavaScript_Errors

    Thread Starter wzshop

    (@wzshop)

    Fixed it!
    Below the correct code for the small-menu.js file (changed line 13). Also proposed this change on github. Thanks for all yr replies.

    /**
     * Handles toggling the main navigation menu for small screens.
     */
    jQuery( document ).ready( function( $ ) {
    	var $subsidiary = $( '#branding' ),
    	    timeout = false;
    
    	$.fn.smallMenu = function() {
    		$subsidiary.find( '#access' ).addClass( 'main-small-navigation' );
    		$subsidiary.find( '#access h3' ).removeClass( 'assistive-text' ).addClass( 'menu-label' );
    		$subsidiary.find( '#access .menu-handle' ).addClass( 'menu-toggle' );
    
    		$( '.menu-toggle' ).unbind( 'click' ).click( function() {
    			$subsidiary.find( '.menu' ).toggle();
    			$( this ).toggleClass( 'toggled-on' );
    		} );
    	};
    
    	// Check viewport width on first load.
    	if ( $( window ).width() < 4000 )
    		$.fn.smallMenu();
    
    	// Check viewport width when user resizes the browser window.
    	$( window ).resize( function() {
    		var browserWidth = $( window ).width();
    
    		if ( false !== timeout )
    			clearTimeout( timeout );
    
    		timeout = setTimeout( function() {
    			if ( browserWidth < 4000 ) {
    				$.fn.smallMenu();
    			} else {
    				$subsidiary.find( '#access' ).removeClass( 'main-small-navigation' );
    				$subsidiary.find( '#access h3' ).removeClass( 'menu-label' ).addClass( 'assistive-text' );
    				$subsidiary.find( '#access .menu-handle' ).removeClass( 'menu-toggle' );
    				$subsidiary.find( '.menu' ).removeAttr( 'style' );
    			}
    		}, 200 );
    	} );
    } );

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Minileven BUG in dropdown menu’ is closed to new replies.