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.

Register

You will be emailed a link to set your password.

Login

Lost password?