Open mmmmta opened 9 years ago
I'm having trouble figuring this out. When you initialize slicknav
it takes a snapshot of your current menu and makes a responsive navigation:
$("#menu").slicknav();
But if you add menu items after the initialization they won't show up. I could initialize slicknav again & again throughout my code base but this is not good. Any ideas on how I might fix this?
This is really a jQuery question and does not belong here. I suggest going to a jQuery tutorial, like w3schools and study jQuery. On Oct 18, 2015 9:30 AM, "Armin Zia" notifications@github.com wrote:
I'm having trouble figuring this out. When you initialize slicknav it takes a snapshot of your current menu and makes a responsive navigation:
$("#menu").slicknav();
But if you add menu items after the initialization they won't show up. I could initialize slicknav again & again throughout my code base but this is not good. Any ideas on how I might fix this?
— Reply to this email directly or view it on GitHub https://github.com/ComputerWolf/SlickNav/issues/108#issuecomment-149016805 .
No its not a jQuery question, its about slicknav's initialization. If the menu items are manipulated dynamically, then there should be a method that clones a fresh copy of the original menu and recreates the responsive menu.
@inexuscore, the best method would be to initialize SlickNav after your external html has loaded and is inserted into the dom. This will allow it to use the proper menu without calling it more than once.
HELP!!! Is not working when you load an external html: