Comments (4)
Note that the SmartMenus Bootstrap add-on supports only navbars (which are normally used for main site navigation). Regular button dropdowns are not supported (i.e. you can't make them multi-level by using the SmartMenus Bootstrap add-on) but they also shouldn't be affected at all and should work normally.
So I am not sure what exactly you are doing to trigger that error message. If you like, please post a live demo which I could test.
from smartmenus.
Ok here it is: http://jsfiddle.net/j994dpLf/
There should be a button dropdown in the navbar (http://getbootstrap.com/components/#btn-dropdowns). The smarmenu plugin throw this error when it wants to initialize the button dropdown: Uncaught TypeError: Cannot read property 'parentNode' of null
on Line 641.
In my opinion it let the dropdown untouched but does not crash the whole menu.
from smartmenus.
OK, I see what you mean.
BTW, please note that even Bootstrap would not allow you to include a button dropdown inside a navbar dropdown - actually, you can put it in there but when you try to activate the button dropdown, your nav dropdown that contains the button will get hidden.
But, anyway, you can achieve this by adding the data-in-mega_smartmenus="true"
attribute to the UL element of the button dropdown. This is a sort of hack that informs the SmartMenus script to neglect that UL element and not consider it a normal nav dropdown (the script produces the error message you mention, since the UL is not nested properly in the parent nav LI tag like the regular dropdowns). Here's your updated demo: http://jsfiddle.net/4wr64kh2/
from smartmenus.
Oh, thats my bad... i used button groups in navbars on many webpages without problems. So i thought its okey that way...
Thanks for your help!
from smartmenus.
Related Issues (20)
- Cannot create property 'guid' on string '.dropdown-menu.show' HOT 6
- menu toggle button not accessible (enough) HOT 4
- smartmenus with "Content-Security-Policy" HOT 6
- Menu Z Index question. HOT 2
- Google SEO 2022: Complete SEO Beginner's Guide
- Pay Per Click vs. Search Engine Optimization
- On-Page vs Off-Page SEO: What's the Difference?
- please add new tag
- A11y: menu toggle button needs a :focus halo HOT 2
- A11y: ESC key should dismiss expanded menu HOT 1
- Second click on link not functional on Bootstrap 5 HOT 1
- A11y: submenus should not open/close on focus HOT 2
- A11y: replace span subIndicator with button HOT 2
- eval of user controlled data? HOT 6
- please add support bootsrap 5 HOT 8
- fix warning
- A11y: add role="button" to span subIndicator HOT 1
- a11y: move the <span> subindicator outside the menu link anchor tag
- [A11Y] aria-current on active menu item HOT 1
- SmartMenus should log errors to console, not use `alert()` HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smartmenus.