Quantcast
Channel: responsive – WordPress.org Forums
Viewing all articles
Browse latest Browse all 16569

andrewmills on "3.6 Upgrade - No Menu Toggle"

$
0
0

Okay, did some digging/debugging with Chrome's Inspect Element tool on the Wisconsin site. Think I might have a potential clue, but not a complete solution just yet.

When your site's page is first loading, it invokes the navigation.js that we mentioned earlier, but line 7:

var nav = document.getElementByID( 'site-navigation' ), button, menu;

. . . returns a null value for nav. Since nav is null, lines 8 and 9 cause the function to return immediately without assigning anything to the button or menu variables.

And since no button object exists/gets created, the button.onClick event handler never gets created. So you can click that menu button all you like, there's just nothing on the other end listening for it.

(Interestingly enough, when I perform the same debugging against a copy of the same site found in Internet Archive from 7/31, the navigation.js works fine, setting a value for nav, button and menu, as well as tying the event handler function to the onClick event of the button object.)

In english, I'm saying I think navigation.js is firing TOO early . . . before the navigation menu has been rendered. Something has changed between 7/31 and now that is causing that particular javascript to be executed before the page has finished loading completely, instead of after. I'm hoping this gives you a Eureka moment, because without knowing more about the difference between TwentyTwelve and your child theme, I can only offer conjecture about what might be causing it.


Viewing all articles
Browse latest Browse all 16569

Trending Articles