SlickNav
SlickNav copied to clipboard
How to add an extra menu link to the slicknav_menu?
For the mobile menu I need an extra menu item. But not for the desktop view.
I am using a workaround, before calling slicknav I add the link, after slicknav init I remove it again:
$('#nav').prepend('<li><a href="#">Login</a></li>');
$('#nav').slicknav({
label: '',
duration: 100,
prependTo: 'body',
init: slickbuilt,
});
// remove login link again
$('#nav li:first-child').remove();
Is there any other way to do this?