jQuery PrMenu
Very lightweight, responsive menu plugin for jQuery. Provides a menu with links evenly distributed across width of menu container.
Features
- Links are evenly distributed within menu container
- Maximum four menus levels (three nested)
- Auto text wrap of long link text (maximum two lines)
- Auto link background colors for all levels based on initial background color
- All settings can be changed by passing in your own options
Installation
npm
Install with npm install prmenu
In your app.js
:
window$ = $ windowjQuery = $
Install by download or from CDN
How to use
Set up your menu as standard ul with li. Nest sub-menus as you need them. As in the menu below, you can have a maximum of four menu levels including the top level:
Home Services Personal Business Professional Services Doctor Lawyer Tax Real Estate Criminal Accountant Shop Support for Customers FAQ About Contact Personal Business Professional Family Doctor Clinic Lawyer Tax Real Estate Lawyer Criminal Enterprise Accountant
Activate the menu when the document is ready:
;
You can optionally override the default plugin settings by passing in your own options:
;
Options
- fontsize : int : default 14 : Size of the menu link text in px
- height : int : default 50 : height of link elements
- case : string : default uppercase : valid css text transform declaration
- lingbgcolor : string : default #000000 : valid css background color in hex format
- linktextweight : int : default 400 : valid css font weight
- linktextfont : string : default sans-serif : valid css font to be applied to link text
- hoverdark : bool : default false : should hover state be darker than link background color?
Demo
PrMenu live demo
npm
History
Please see the releases changelog.
License
Released under MIT Licence