npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

jquery.scrollmenu

v0.10.1

Published

Build automatically multidimensional menus from headings.

Readme

jQuery Scrollmenu

There is no easier way to build a menu as with jQuery Scrollmenu. It will automatically walk through your headings and build anchors and IDs.

How to start

Insert the JavaScript file

Just insert the JavaScript after the jQuery library

<script type="text/javascript" src="path/to/jquery.scrollmenu.js"></script>

Call the plug-in

Simple call the plug-in after your container selector and insert the menu wherever you want:

(function($) {
  $(document).ready(function() {
    var menu = $('body').scrollmenu(/* options */);
    $('#nav').append(menu.scrollmenu('get'));
  });
}(jQuery));

Style it

There is no style included by default. If you want to hide all second-level sub-menus you can use this snippet:

ul.menu {
  ul {
    display: none;
  }   

  li.active {
    > ul {
      display: block !important;
    }
  }
}

Or if you just use CSS:

ul.menu ul {
  display: none;
}   

ul.menu li.active > ul {
  display: block !important;
}

Options

start

Start at this header.

Default: 'h2'

Options: 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'

Type: jQuery selector

depth

Depth from start point; 0 for disabling depth selectors.

Default: 2

Type: Integer

jumpSpeed

Scroll speed when click on a menu item; 0 for disabling.

Default: 400

Type: Integer

offsetScroll

Amount of pixels from the window top.

Default: 0

Type: Integer

offsetActive

Active item offset. Will set the active class on the menu earlier the higher it is.

Default: 0

Type: Integer

toggleWhileJumping

Toggle classes while jumping (scrolling) to a header.

Default: false

Type: Boolean

disableHeaderSelector

Selector to disable a header. Will be used within the :not() function.

Default: '[disabled]'

Type: jQuery selector

activeClass

Class name for current list item.

Default: 'active'

Type: String

parentClass

Class name for parent list item of the current item.

Default: 'active'

Type: String

menuClass

Class name for the root list.

Default: 'menu'

Type: String

pushToHistory

Add to browser history (IE>9 required).

Default: true

Type: Boolean

Callbacks

onJumpBefore(newId, oldId)

Fired before jumping to a header.

onJumpAfter(newId, oldId)

Fired after jumping to a header.

Release Notes

v0.10.0

  • Changed default disable selector to [disabled]
  • Code optimizations
  • New approach to set history (IE>9); Set history as opt-out
  • Added callbacks
  • Better offset (scroll- and active-offset are now separated)
  • Active classes now applied after DOM is ready (initial)

v0.9.2

  • Remove debug information

v0.9.1

  • Fixed generating IDs

v0.9.0

  • Add README.md and documentation
  • Add LICENSE
  • Add Bower and npm

v0.5.0

  • Add refresh and destroy functions
  • Add option to not apply classes while scroll to an header
  • Add option to disable a header
  • Classes are missing after reloading
  • Don't set default parameters since it comes with ECMAScript 6

v0.4.1

  • Some bug-fixes

v0.4

  • First pre-release