-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Navwalker - Issue with menu toggle expand #201
Comments
toggle requires jquery and bootstrap js library; did you remember to include them and have the proper path included? |
Thanks for your reply @LouisMilotte . The code to include bootstrap items follow below:
This is my first experience with both wordpress and navwalker so feel free to point out any mistakes with my code Thanks and regards, |
I don't see the jquery library in there; only the bootstrap one. https://codex.wordpress.org/Function_Reference/wp_register_script WP Has a handle for jquery pre-registered; the loading should be:
|
Thanks for your reply @LouisMilotte . Is it possible to provide instructions on where the jquery handle should be quote ? Regards, |
Change the third argument of from:
to:
See http://codex.wordpress.org/Function_Reference/wp_enqueue_script#Default_scripts_included_with_WordPress for how to add dependencies to scripts and pre-load them. |
Thanks for your reply. I did update that however the expand on toggle still doesn't work :(. Regards, |
Would you link your page please? |
Seeing a live page would be very beneficial to help solve this. On 19:19, 8 Nov 2015, at 19:19, LouisMilotte notifications@github.com wrote:
|
firesafe.com.mt |
Hey @josephborg07 When I visit the site you linked I'm able to make the toggle work. Have you changed something in the last half hour that would have made it start working? Perhaps there was a caching issue that made your browser hold the old (not working) version from prior to you making the changes that enqueued jQuery? |
Thanks @pattonwebz for looking into my problem. I am able to expand the main toggle button and show the first level of menu links, however I don't manage to expand the second layer of menu links (Sub menu). Thanks in advance. |
Ahh ok I see what is the problem now, I wasn't clear on it before. Let me check again once I have a moment and I'll see if there's something I can spot. |
Thanks for your help @pattonwebz I'll wait for your reply. |
Has anyone got to the bottom of this please ? |
Apologies @josephborg07, I have yet to find the time to look closely My only guess, based on the little time I have had to investigate, is On 09/11/15 02:52, josephborg07 wrote:
|
Yes the on hover is intentional feature added through CSS. The thing is only the on click doesnt work (triggered through jquery). Another thing I've tested further is, on my dev environment everything works (tested on several instances using Windows 7 and wamp). It's when I move the site to the live environment that it stops working; not sure if it changes anything. Thanks, |
Hi Guys, Solved the issue. It was a mistake from my end as bootstrap was not referenced properly. This is how it was initially referenced (wrong) This is how it should have been referenced (working): The main difference was that the path was /bootstrap/js/bootstrap.min.js when it should have been /js/bootstrap.min.js. I still would like to thank you for promptly trying to help me with my issues. Regards, |
I've decided to move to the navwalker bootsrap menu on my wordpress site, and started testing the new menu on my development site rather than directly on the live site. Once done I'v copied everything from my development to my live site and everything works except for the expand toggle.
Navbar code in header:
Any help is greatly appreciated as fixes from other pages failed to work.
Thanks in advance,
J
The text was updated successfully, but these errors were encountered: