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

zeynepjs

v2.2.0

Published

a lightweight, multi-level jQuery side menu plugin

Downloads

382

Readme

zeynepjs

A lightweight multi-level jQuery side menu plugin.

Downloads install size

zeynepjs is a light-weight multi-level jQuery side menu plugin. It's fully customizable and is compatible with modern browsers such as Google Chrome, Mozilla Firefox, Safari, Edge and Internet Explorer.

Install

$ npm install zeynepjs --save

Usage

var zeynep = $('.zeynep').zeynep({
  load: function (element, options) {
    console.log('zeynepjs menu is successfully loaded')
  }
})

// opens the menu
zeynep.open()

// closes the menu
zeynep.close()

// dynamically event binding
zeynep.on('closing', function () {
  console.log('guys, the side menu is closing')
})

// destroys the menu
zeynep.destroy()

Using with Webpack

Once the library installed in your project, just import it:

import 'zeynepjs'

Options

| Option | Type | Default | Description | | --- | --- | --- | --- | | htmlClass | boolean | true | If true zeynepjs will add some classes to <html/> element like zeynep-initialized, zeynep-opened |

Methods

zeynepjs exposes those:

| Option | Type | Parameters | Description | | --- | --- | --- | --- | | on | function | event name and handler function | To dynamically event binding | | open | function | - | To open the menu | | close | function | disableEvent (optional) | To close the menu. If disableEvent is passed true, no close event will be fired | | destroy | function | - | To destroy the zeynepjs instance on initialized element |

Events

Events can also be defined in options.

loading(element, options)

Fired when the menu is being loaded. This event cannot be defined dynamically. It needs to be defined in options.

element is the element that zeynepjs is being loaded on.

options is the initialized zeynepjs instance options.

load(element, options)

Fired when the menu is loaded. This event cannot be defined dynamically. It needs to be defined in options.

element is the element that zeynepjs has been loaded on.

options is the initialized zeynepjs instance options.

opening(element, options, details)

Fired when the menu or a sub-menu is being opened.

element is the zeynepjs instance element.

options is the initialized zeynepjs instance options.

details contains a flag which indicates the item that is being opened is the menu or a sub-menu and the sub-menu DOM Element ID.

opened(element, options, details)

Fired when the menu or a sub-menu is opened.

element is the zeynepjs instance element.

options is the initialized zeynepjs instance options.

details contains a flag which indicates the opened item is the menu or a sub-menu and the opened sub-menu DOM Element ID.

closing(element, options, details)

Fired when the menu or a sub-menu is being closed.

element is the zeynepjs instance element.

options is the initialized zeynepjs instance options.

details contains a flag which indicates the item that is being closing is the menu or a sub-menu and the sub-menu DOM Element ID.

closed(element, options, details)

Fired when the menu or a sub-menu is closed.

element is the zeynepjs instance element.

options is the initialized zeynepjs instance options.

details contains a flag which indicates the closed item is the menu or a sub-menu and the closed sub-menu DOM Element ID.

destroying(element, options)

Fired when the menu is being destroyed.

element is the zeynepjs instance element.

options is the zeynepjs instance options that is being destroyed.

destroyed(element, options)

Fired when the menu is destroyed.

element is the destroyed zeynepjs instance element.

options is the destroyed zeynepjs instance options.