dbushell / Responsive-Off-Canvas-Menu

A responsive off-canvas menu using CSS transforms and transitions. This repository contains several demos to support a Smashing Magazine article.
819 stars 217 forks source link

Var Inner is being parsed before DOM ready if the script is loaded in the document head #12

Open nikglavin opened 10 years ago

nikglavin commented 10 years ago

Is there a reason these are defined before app.init as the DOM might not always be ready if the script is loaded early ?

        var inner = document.getElementById('inner-wrap'),
            nav_open = false,
            nav_class = 'js-nav';
torkiljohnsen commented 10 years ago

Shouldn't be an issue when the script is loaded at the end of the document? https://github.com/dbushell/Responsive-Off-Canvas-Menu/blob/master/step4.html