-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am stupid. How to set up? #1
Comments
Hello @mark22, |
@skywalkapps thanks for getting back to me so quickly. So besides the styling, the navigation items will not actually autopopulate into a MORE type of dropdown. I can stylize them to float:left just fine, but they expand their container and don't shrink when the page shrinks. Is there a JS call I need to make to get the navigation system to intialize/start up? Most JS/JQuery plugins I use have a minimal call to get the plugin to startup. Just wondering if I missed a step here... Thanks! |
For example, I found this on your demo page, is this the bare bones JS needed for it to start up? Thanks!
|
I have added one more example to the documentation to show, how it works without the Bootstrap... To make it work, you need to include only nav-priority.min.js and nav-priority.min.css. Then you just initialize it via: Then you need just a few lines of CSS to style your menu as inline list. That is basically it. |
I looked at this too. Tried using this sans-Bootstrap but it appears Bootstrap is indeed still handling the interaction layer. This includes toggling dropdown classes, So, it appears that, at this time, if you're going to use it without Bootstrap, you'd need to handle most of the styling and toggling of classes and attributes (CSS + JS). Also, in case anyone needs to know how to specify plugin options, here's a copy-paste snippet that should get the point across: // Options:
var navPriorityOptions = {
dropdownLabel: 'More',
dropdownMenuClass: 'nav-priority-dropdown-menu'
};
document.addEventListener('DOMContentLoaded', function (event) {
window.navPriority('[data-nav="priority"]', navPriorityOptions); // <---- Options object goes here
}); |
I've included the nav-priority.js and nav-priority.css in my header and I've put the sample HTML in:
But nothing works.
It looks like your sample page uses bootstrap, is that a requirement for this? Is there an explicit JS call I need to run to actually initialize the menu system?
Right now All I see is a big blocky/ugly "Toggle navigation" button which doesnt do anything and a list of the menu items horizontally, but no prioirty+ or anything dynamic. Thanks much!
The text was updated successfully, but these errors were encountered: