A repository of over 1000 quality jQuery plugins

jQuery GreedyNav

GreedyNav is a jQuery Navigation plugin.

Created by Luke Jacksonn

A responsive navigation menu that stacks items into a dropdown menu when they overflow.

Not what you're looking for? Click here to view more Navigation jQuery plugins

Greedy Navigation

Include greedynav.css and greedynav.js on the page and put the <nav> code in the body of the document. When the user resizes the window the nav will shrink, any overflowing items will be removed from the visible list and get prepended to a list of vertically stacked items that are hidden. The user is notified of this action by a count badge next to a hamburger icon at the end of the menu, which acts as a dropdown trigger button for the hidden list.

Demo

http://codepen.io/lukejacksonn/pen/BowbWE

Usage

<head>
<link href="greedynav.css" rel="stylesheet" type="text/css" >
<script src="greedynav.js"></script>
</head>
<body>
<nav class='greedy'>
  <h1>GreedyNav</h1>
  <ul class='links'>
    <li><a href='#'>navbar</a></li>
    <li><a href='#'>that</a></li>
    <li><a href='#'>handles</a></li>
    <li><a href='#'>overflowing</a></li>
    <li><a href='#'>menu</a></li>
    <li><a href='#'>elements</a></li>
    <li><a href='#'>effortlessly</a></li>
  </ul>
  <button>MENU</button>
  <ul class='hidden-links hidden'></ul>
</nav>
</body>

TODO

  • Extend demo to show varients
  • Make into a web component


You might also like these other Navigation jQuery Plugins

  • Navigation

    A jQuery plugin for simple responsive navigation.

  • jQuery Konami

    jQuery plugin to trigger an event after the success of the Konami Code (up up down down left right left […]

  • Headroom.js

    Give your pages some headroom. Hide your header until you need it.

 Views
 Downloads

Download Github Page
License:

The MIT License (MIT)