Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

priority-navigation

> 编程语言
Open source

Javascript implementation for Priority+ Navigation — no dependencies

768 stars0 likes1 views
WebsiteGitHub

About

Javascript implementation for Priority+ Navigation — no dependencies

PriorityNavigation.js

PriorityNav is a pure javascript plugin that will move your menu items if they don't fit its parent.

Vue.js version here.


Take a look at the Demo site.


Features

  • Accessible Adds appropriate aria attributes and set focus to links when needed.
  • No dependencies The plugin is written in pure javascript making it fast and lean.
  • Breakpoint When the breakpoint has been reached the plugin will automaticly move all items to the dropdown & change the toggle label to navDropdownBreakpointLabel.
  • Smart calculation of available space It automatically looks for the main navigation's siblings and calculates remaining space.
  • Flexible Because of the point above you can have multiple inline-block/flexbox items on the same level.
  • Non obstructive menu dropdown The dropdown menu can be closed by clicking outside and pressing escape.
  • Callbacks Callbacks are fired when an item is moved or moved back from the main navigation.

Usage

Load plugin files

xml

    

    

Call plugin without any options.

javascript
var nav = priorityNav.init();

Ideal html structure

xml

    
 

Options

…

Package managers

  • npm: npm install --save priority-nav
  • bower: bower install priority-nav.js

Building the source files

bash
#cloning repository
git clone https://github.com/gijsroge/priority-navigation.git
cd priority-navigation

#dependencies
npm install

#build files to dist folder
grunt build

IE9 Support

To support Internet Explorer 9 and lower classList.js must be added your page.

xml

IE8 Support

To support Internet Explorer 8, es5-shim and classList.js from above must be added your page.

xml

Alternatives

  • https://github.com/lewie6/ng-priority-nav (angular)
  • https://github.com/matthornsby/priority-navigation (jQuery)
  • https://github.com/352Media/flexMenu (jQuery)
  • https://github.com/VPenkov/okayNav (jQuery)
  • https://github.com/VPenkov/okayNav-vanillaJS (no dependencies)
  • https://github.com/skywalkapps/nav-priority (no dependencies)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScriptnavigationpriorityresponsive

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言