Skip to content
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

Dropdowns not working #377

Closed
angeidheal opened this issue Apr 25, 2018 · 9 comments
Closed

Dropdowns not working #377

angeidheal opened this issue Apr 25, 2018 · 9 comments

Comments

@angeidheal
Copy link

angeidheal commented Apr 25, 2018

I've added a sub item to one of my menu items. The dropdown indicator appears next to my menu item but I am not getting the dropdown.

I used the fixed top example from the readme and all I've changed is the navbar-brand link and text. Depth is set at 2.

@pattonwebz
Copy link
Member

Hey @MacMhicheil,

Sorry I didn't reply before now. So do you have an example link or anything that I could look at to see if I spot something?

@gitviola
Copy link

For me it doesn't work either. I also noticed that for dropdown-parents the href is always set to #, is that on purpose? I'm wondering if maybe some people want to have the parent also link to a specific page.

@pattonwebz
Copy link
Member

@schurig do you have a live link that I could take a look at and see the misbehaving items?

The top level item being changed to # is intentional to make the link act as a toggle. I have been considering adding a filter which will let it remain a link if required though so I will look into that more this coming week :)

@gitviola
Copy link

@pattonwebz the website I'm working on isn't meant to be linked yet. But I've sent you an email with the link so you can have a look :) Hope that helps!

@gitviola
Copy link

@pattonwebz works now!

@MacMhicheil I just noticed that I had an other menu on the page that raised a php exception. After correcting the walker there it now works as expected. Can you check if that's the case for you?

@angeidheal
Copy link
Author

Hi guys, sorry I haven't got back to you. I haven't been receiving notifications for some reason and didn't think anybody had replied. The site is http://macmhicheil.uk/ and the menu item Pròiseactan should have a dropdown list of my projects. I've attached my header.php file
header.txt

@pattonwebz
Copy link
Member

Hey @MacMhicheil no worries on delayed reply :)

So looking at the site you linked I do not see the jQuery script enqueued. You need to enqueue that before bootstrap. If you look in the debug console on your site you will see an error something like function 'fn' is undefined which happens when jQuery isn't available.

Also here's a 404 error for the /js/scripts.js file. I think that is probably unrelated to the dropdowns not working but figured I'd mention it anyway :)

@angeidheal
Copy link
Author

Thanks for your help @pattonwebz. It was an error in the line where I enqueued the jquery script.

@pattonwebz
Copy link
Member

Glad this one got fixed. Closing the issue for now but if farther issues pop up feel free to reopen it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants