New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simply can't get it to work #10
Comments
Hi Kenneth, If you look into the JS console of your website, you will something like this: Hope this helps |
Hi Lukasz, Thanks a lot for the quick reply! Okay didn't know that. I'll try adding the domready script to the site. Regarding the last option, how do I initialize selectnav at the bottom? Do you mean at the bottom of the header, body or what? |
You can paste the following code just before the closing of your ...
<script src="selectnav.min.js"></script>
<script>selectnav('nav');</script>
</body> This way you're sure that the script will be initialized after the browser parsed the rest the document (including your 'nav' element, which is the only one that actually counts here), which has basically the same effet as calling domready() at the top of the document. You can learn more about the two techniques here: |
Awesome - thanks a lot for great support! |
Hi Lukasz,
I just can't get selectnav to work. I've installed it on my demosite and it just won't work. I've walked through the 4 steps like 20 times, to make sure I did not mess it up. But I named the nav id="nav", I the CSS (both default and mobile), loaded the script (tried with the DOM ready, without the DOM, and at the bottom of the site).
It still won't work as it still shows the original menu. It seems like it doesn't apply the class to menu. Check it out at http://kennethdanielsen.dk/new/index.html and tell me what I do wrong.
Thanks in advance!
The text was updated successfully, but these errors were encountered: