Giter Club home page Giter Club logo

Comments (4)

vadikom avatar vadikom commented on July 2, 2024

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.

okaufmann avatar okaufmann commented on July 2, 2024

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.

vadikom avatar vadikom commented on July 2, 2024

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.

okaufmann avatar okaufmann commented on July 2, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.