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

jquery-contextify

v1.0.8

Published

A lightweight jQuery plugin for creating Bootstrap powered context menus.

Downloads

9

Readme

jQuery Contextify - Lightweight Context Menu

A lightweight jQuery plugin for creating Bootstrap powered context menus.

Build Status Dependency Status

Setup

Load from CDN

The easiest way to get up and running is to load jQuery Contextify using a CDN. Make sure jQuery is loaded first though.

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-contextify/1.0.7/jquery.contextify.min.js"></script>

or

<script src="//cdn.jsdelivr.net/jquery.contextify/1.0.7/jquery.contextify.min.js"></script>

Install with Bower

Use the following command to install jQuery Contextify using bower.

$ bower install jquery-contextify

Or simply add jquery-contextify to your project's bower.json.

  "dependencies": {
    "jquery-contextify": "latest"
  }

Download

You can also just download the latest package.

  • Download latest version
  • or curl -O https://raw.github.com/abeMedia/jquery-contextify/master/dist/jquery.contextify.js

Usage

jQuery Contextify needs to be activated via JavaScript.

$('.foo').contextify(options);

The menu items are passed as an array in options.items. See the following example for creating a basic context menu.

<a class="foo" href="#" data-name="John">Click me</a>

<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-contextify/1.0.7/jquery.contextify.min.js"></script>
<script>
var options = {items:[
  {header: 'Options'},
  {text: 'First Link', href: '#'},
  {text: 'Second Link', onclick: function(e) {
    alert('Hello ' + e.data.name);
  }},
  {divider: true},
  {text: 'Stuff', href: '#'}
]}
$('.foo').contextify(options);
</script>

This will initiate jQuery Contextify on the .foo elements with the menu items specified in options.items.

Options

| Name | Type | Default | Description | |-----------|------|---------|-------------| | items | array | [] | An array of menu item objects. | | action | string | contextmenu | The action on which to display the context menu (can be contextmenu, click or mouseover). | | menuId | string | contextify-menu | The id attribute of the context menu. | | menuClass | string | dropdown-menu | The class attribute of the context menu. | | headerClass | string | dropdown-header | The class attribute of menu headers. | | dividerClass | string | divider | The class attribute of menu dividers. |

Copyright

© 2014-2016 Adam Bouqdib - http://abemedia.co.uk