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 🙏

© 2024 – Pkg Stats / Ryan Hefner

push-menu

v2.0.8

Published

pushMenu is based on Manoela llic's Multi Level Push Menu, but implemented with jQuery.

Downloads

170

Readme

jQuery pushMenu (jQuery.pushMenu.js)

v2.0.8

pushMenu is based on Manoela llic's Multi Level Push Menu, but implemented with jQuery.

Features

  • Multiple level menu support
  • Infinite menu level nesting
  • Cross browser compatibility (IE9+, Chrome, Firefox, Safari, Opera, Android Browser, iOS Safari)

Usage

Getting started

Grab the code

Bower

bower install --save push-menu

Node

npm install push-menu --save

Include the CSS

<link rel="stylesheet" href="dist/css/stylesheet.css" />

There is also a SCSS file available inside the source

Include the Javascript

<script src="dist/js/jquery.pushMenu.min.js"></script>

Setting up the html

<div class="site">
    <div class="site-outer">
        <nav class="mp-menu mp-cover" id="mp-menu">
            <div class="mp-level">
                <ul>
                    <li><a title="CLOSE X" href="javascript:;" class="mp-back">CLOSE X</a></li>
                    <li><a title="" href="/">Home</a></li>
                    <li><a title="" href="">Menu item 1</a></li>
                    <li><a title="Menu item 2" href="javascript:;">Menu item 2 ></a>
                        <div class="mp-level">
                            <a href="javascript:;" class="mp-back">BACK</a>
                        <strong>Menu item 2</strong>
                            <ul class="sub-menu third-level">
                                <li><a title="" href="">Menu item 2.1</a></li>
                                <li><a title="" href="">Menu item 2.2</a></li>
                                <li><a title="" href="">Menu item 2.3</a></li>
                                <li><a title="" href="">Menu item 2.4</a></li>
                                <li><a title="" href="">Menu item 2.5</a></li>
                            </ul>
                        </div>
                    </li>
                    <li><a title="" href="">Menu item 3</a></li>
                    <li><a title="" href="">Menu item 4</a></li>
                    <li>

                        <a title="Menu item 5" href="javascript:;">Menu item 5 ></a>

                        <div class="mp-level">
                            <a href="javascript:;" class="mp-back">BACK</a>
                            <strong>Menu item 5</strong>
                            <ul class="sub-menu third-level">
                                <li><a title="" href="">Menu item 5.1</a></li>
                                <li><a title="" href="">Menu item 5.2</a></li>
                                <li>
                                    <a title="Menu item 5.3" href="javascript:;">Menu item 5.3 ></a>
                                    <div class="mp-level">
                                    <a href="javascript:;" class="mp-back">BACK</a>
                                    <strong>Menu item 5.3</strong>
                                        <ul class="sub-menu third-level">
                                            <li><a title="" href="">Menu item 5.3.1</a></li>
                                            <li><a title="" href="">Menu item 5.3.2</a></li>
                                            <li><a title="" href="">Menu item 5.3.3 ></a></li>
                                            <li><a title="" href="">Menu item 5.3.4</a></li>
                                            <li><a title="" href="javascript:;">Menu item 5.3.5 ></a>

                                                <div class="mp-level">
                                                    <a href="javascript:;" class="mp-back">BACK</a>
                                                    <strong>Menu item 5.3.5</strong>
                                                    <ul class="sub-menu third-level">
                                                        <li><a title="" href="">Menu item 5.3.5.1</a></li>
                                                        <li><a title="" href="">Menu item 5.3.5.2</a></li>
                                                    </ul>
                                                </div>
                                            </li>
                                        </ul>
                                    </div>
                                </li>                                        
                                <li><a title="" href="">Menu item 5.4</a></li>
                            </ul>
                        </div>
                    </li>
                </ul>
            </div>
        </nav>

        <div class="site-wrapper">
            <div class="site-container">
                <h1><a href="javascript:;" id="trigger" class="burger" title="Open"></a> jquery pushMenu v2.0.7</h1>

                <h2>Site content</h2>

            </div>
        </div>
    </div>
</div>

Setting up the Javascript

<script>
    
    $(document).ready(function(){
        $('#mp-menu').pushMenu({
            type: 'overlap',
            levelSpacing: 0,
            backClass: 'mp-back',
            trigger: '#trigger',
            pusher: '.site-outer',
            scrollTop: false
        });
    });
</script>

Options

type: 'cover'                       // cover || overlap     -   Whether the menu level should overlap slightly or completely cover each other
levelSpacing: 0                     // If the 'type' is set to overlap how much should be visible from the previous level
backClass: 'mp-back'                // The back button class
trigger: '#trigger'                 // What should open the menu on click / touch
pusher: '.site-outer'               // What should be moved when the menu opens - The plugin relies on moving the site out of the way to make way for the menu
scrollTop: false                    // true || false    -   If set to true when moving between levels the screen will automatically scroll back to the top

Todos

  • Add some additional examples
  • IE8 to play nicely
  • Option to slide menu in from the right
  • Main content of the site should be fixed to the page when menu is open and not scroll with the menu
  • Add callback for onOpen
  • Add callback for onClose
  • Add method to open menu programmatically at a specific level
  • Add method to close menu
  • Add option to choose whether to close menu on body click
  • Add option if level has an arbitrary active class menu opens at this level again