Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

Reply To: Dynamic Menu Population Not Supported

Home Forums Older releases 1.0.x + Bootstrap addon Dynamic Menu Population Not Supported Reply To: Dynamic Menu Population Not Supported

#2873
admin
Keymaster

I already replied on Twitter but I guess you haven’t seen it:

First, grab the latest dev version from https://github.com/vadikom/smartmenus (since beta1 has some related bugs). Then:

a) if you create the whole ul.navbar-nav element dynamically, call $.SmartMenus.Bootstrap.init() to init it after it’s inserted in the DOM.

b) if your ul.navbar-nav is available in the DOM ondomready and you just update parts of it after that (e.g. add items, sub menus, etc.), call this method after it’s populated:

http://www.smartmenus.org/docs/#refreshInstance

You will need to set your ul.navbar-nav element some id (e.g. “main-menu”) so that you could refer it and use the above API method.

Please let me know if you still have any troubles.