jQuery contextMenu plugin & polyfill

Overview

jQuery contextMenu plugin & polyfill

Greenkeeper badge

Travis npm npm CDNJS npm

$.contextMenu is a management facility for - you guessed it - context menus. It was designed for an application where there are hundreds of elements that may show a context menu - so intialization speed and memory usage are kept fairly small. It also allows to register context menus without providing actual markup, as $.contextMenu generates DOMElements as needed.

features - demo - documentation

Sauce Test Status

Dependencies

  • jQuery >=1.8.2
  • jQuery UI position (optional but recommended)

Usage

register contextMenu from javascript:

$.contextMenu({
    // define which elements trigger this menu
    selector: ".with-cool-menu",
    // define the elements of the menu
    items: {
        foo: {name: "Foo", callback: function(key, opt){ alert("Foo!"); }},
        bar: {name: "Bar", callback: function(key, opt){ alert("Bar!") }}
    }
    // there's more, have a look at the demos and docs...
});

have a look at the demos.

Version 3.0 beta

Version 3.0 is a restructure of the javascript into something more sane written in ES6. It consolidates all API's so callbacks are better documented and more concise. The basics are still the same, but all callbacks are structured differently.

The goal of this refactor was mostly to make the ContextMenu easier to maintain, and make the API's more consise. It also adds JSdoc comments so the API documentation is generated from the code and it enables code completion.

Check out the 3.x branch, or install with npm install [email protected].

HTML5 Compatibility

Firefox 8 implemented contextmenu using the <menuitem> tags for menu-structure. The specs however state that <command> tags should be used for this purpose. $.contextMenu accepts both.

Firefox 8 does not yet fully implement the contextmenu specification (Ticket #617528). The elements a, button, input and option usable as commands are being ignored altogether. It also doesn't (optically) distinguish between checkbox/radio and regular commands (Bug #705292).

Note: While the specs note <option>s to be renderd as regular commands, $.contextMenu will render an actual <select>. import contextMenu from HTML5 <menu>:

$.contextMenu("html5");

Interaction Principles

You're (obviously) able to use the context menu with your mouse. Once it is opened, you can also use the keyboard to (fully) navigate it.

  • ↑ (up) previous item in list, will skip disabled elements and wrap around
  • ↓ (down) next item in, will skip disabled elements and wrap around
  • → (right) dive into sub-menu
  • ← (left) rise from sub-menu
  • ↵ (return) invoke command
  • ⇥ (tab) next item or input element, will skip disabled elements and wrap around
  • ⇪ ⇥ (shift tab) previous item or input element, will skip disabled elements and wrap around
  • ⎋ (escape) close menu
  • ⌴ (space) captured and ignore to avoid page scrolling (for consistency with native menus)
  • ⇞ (page up) captured and ignore to avoid page scrolling (for consistency with native menus)
  • ⇟ (page down) captured and ignore to avoid page scrolling (for consistency with native menus)
  • (home) first item in list, will skip disabled elements
  • (end) last item in list, will skip disabled elements

Besides the obvious, browser also react to alphanumeric key strokes. Hitting r in a context menu will make Firefox (8) reload the page immediately. Chrome selects the option to see infos on the page, Safari selects the option to print the document. Awesome, right? Until trying the same on Windows I did not realize that the browsers were using the access-key for this. I would've preferred typing the first character of something, say "s" for "save" and then iterate through all the commands beginning with s. But that's me - what do I know about UX? Anyways, $.contextMenu now also supports accesskey handling.

Authors

License

$.contextMenu is published under the MIT license

Special thanks

Font-Awesome icons used from encharm/Font-Awesome-SVG-PNG.

SWIS ❤️ Open Source

SWIS is a web agency from Leiden, the Netherlands. We love working with open source software.

Comments
  • Asynchronous create sub menu's after context menu has opened.

    Asynchronous create sub menu's after context menu has opened.

    Hi,

    I've been searching the past 2 days for a perfect context menu, this one and another one stand out above all others. To put it in perspective: I am developing an app with AngularJS. Thus I rather have a angular context menu then a default jquery menu. One came really close: https://github.com/Templarian/ui.bootstrap.contextMenu Yet this one was not so nice with providing icons, keyboard events some other things. But it does has one major improvement above this one: Async create sub menu's. Instead of providing an item I can provide an promise, which would be loaded once the user has opened the sub-menu.

    Perhaps it would be possible to implement something similar to this? So instead of only providing items, or a list of items, provide a promise, and once it is completed it will render the sub menu's.

    I know the documentation provides something with async loading the context menu, but that's not what I am looking for, that happens before everything is created. This should happen once the context menu has already been created, either after the menu has opened, or once the user wants to open the sub menu.

    See the plunker for an example using that angular directive: https://embed.plnkr.co/Bebmjn2aAlflxYe1cwIS/

    Similar to #421, but then new created sub menu's.

    Feature 
    opened by Ruud-cb 17
  • Submenu resize weirdly

    Submenu resize weirdly

    I have just updated to version 2.0.0 and noticed that the submenu sometimes resize weird and for some reason its missing 1 px in the width even tho the width is not over max-width. I have made a jsfiddle that shows the problem here: http://jsfiddle.net/RareDevil/vww70pLa/

    I'm still trying to find out why this problem is there and i have not yet found the problem.

    Bug 
    opened by RareDevil 17
  • Usage when selector isn't available

    Usage when selector isn't available

    If a selector isn't available, is there any other way to use this plugin?

    For example, given:

    $("#container .thing").each(function() {
        $(this).anotherPlugin(); // 
    });
    

    If anotherPlugin wants to create a context menu, there appears to be no way to limit its effects to only the .thing elements in #container, since anotherPlugin() does not get a selector.

    If contextMenu() can't behave like other jquery plugins (i.e. $(selector).contextMenu()), then can its 'selector' attribute also allow objects in addition to string selectors? e.g. I could, within anotherPlugin, do something like:

    $.contextMenu({ selector: $(this) });
    

    Or am I missing an altogether better solution? thanks,

    Feature 
    opened by mstratman 17
  • iOS compatibility

    iOS compatibility

    I have plugged the contextMenu into my site and I am trying to use it on the iPad. It is opening just fine, but when I click on an item, the callback method is not firing.

    Do you have any suggestions?

    Bug 
    opened by johnson-bt 17
  • Support for dynamic items

    Support for dynamic items

    Hi,

    This is a feature request rather than an issue ticket. I would love to have the possibility to dynamically add items to a contextmenu at runtime.

    The scenario: A contextmenu gets triggered and the menu items are created depending on info from the trigger element. Like 'Add to' > [bunch of dynamic elements]

    I tried to alter the opt.commands and opt.items objects in the show event of the contextmenu but with no effect.

    One way to achieve this would be a beforeRender event where it's possible to replace the items created at registration with new ones. Another way (seen at jjmenu plugin) is instead of a hardcoded item object literal one can use a function which provides context (of the trigger element) and returns a dynamically created item.

    As a workaround (haven't tested this yet) it should be possible to register a click event with jQuery which then (functions as wrapper and) creates a $.contextMenu with items in the context of the click event. But this could get messy really quick with a lot of different trigger events.

    I don't know if this functionality is within the designated scope of jQuery-contextMenu, but it would greatly enhance the overall very good experience with this plugin. :)

    Thanks.

    opened by endzeit 16
  • Bootstrap Modal not working in ContextMenu

    Bootstrap Modal not working in ContextMenu

    Hi there,

    I'm trying to open a bootstrap modal when click on the item inside contextMenu. But it fails to open modal.

    The code is as appended below,

    <div class="portlet-body">
      <div id="context" data-toggle="context" data-target="#context-menu">
        <p> Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras.
          </p>
      </div>
      <!-- Your custom menu with dropdown-menu as default styling -->
      <div id="context-menu">
        <ul class="dropdown-menu" role="menu">
          <li>
            <a data-target="#demographicmodal" data-toggle="modal">
              <i class="icon-user"></i> New User </a>
          </li>
          <li>
            <a href="javascript:;">
              <i class="icon-present"></i> New Event
              <span class="badge badge-success">4</span>
            </a>
          </li>
        </ul>
      </div>
    </div>
    
    <!-- Modal Content -->
    <div id="demographicmodal" class="modal fade" tabindex="-1" aria-hidden="true">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-body">
            <div class="row">
              <label data-dismiss="modal" onclick="reloadallergies()" class="fa fa-times pull-right"></label>
            </div>
          </div>
        </div>
      </div>
    </div>
    

    I could not able to figure out, why the modal is not working. Pls help me to solve this.

    Waiting for response 
    opened by sathyaprakash94 14
  • Custom right click trigger

    Custom right click trigger

    I need to disabled right click and trigger manually the context menu. (My final purpose is to tigger the menu on an AJAX response).

    First, I declared my context menu using ignoreRightClick :

    
    $.contextMenu({
        selector : selector,
        items: ...,
        ignoreRightClick: true
    });
    

    Then, I bound mouseup to trigger context menu :

    
    $(selector).bind('mouseup', function(e) {
        if (e.button == 2) {
            $(selector).contextmenu();
        }
    }
    

    The issue is that my manual trigger is ignored instead of the right click trigger I temporarly fixed it adding a test on the button attribute:

    
    // jquery.contextmenu.js line 190
    // ignore right click trigger
    if (ignoreThisClick && e.button == 2) {
        ignoreThisClick = false;
        return;
    }
    

    Thanks

    opened by jpimag 14
  • Pass menu-title data attribute as option parameter

    Pass menu-title data attribute as option parameter

    The issue I ran into is, that the demo example for menu-titles works on static contextmenus but is not working for dynamic created menus. Since you dont have a callback about for the creation of the menu to set the data-attribute. I solved this by passing the menu-title string directly as option parameter, similar to className.

    all i did was adding this on creation of the contextmenu if(opt.title) opt.$menu.attr("data-menutitle", opt.title);

    I might add a pull request.

    Feature Waiting for response 
    opened by Knochenmark 13
  • Made a check to see if target have a heigher zIndex then the …

    Made a check to see if target have a heigher zIndex then the …

    …contextmenu in the key event hanlder.

    I made this because there was a problem where the contextmenu would steal the key events from a textarea that was in a dialog above the contextmenu. So this is made to see if the target has a zIndex if it dont it tries to find the first offsetparent or parent that have a zIndex and compare this to the contextmenu's zIndex and if the targets zIndex is heigher then it will stop the event handler so that it wont steal key event from the dialog that are above the contextmenu.

    opened by RareDevil 13
  • Opening a second menu can break the

    Opening a second menu can break the "layer".

    I am testing the demo at http://medialize.github.com/jQuery-contextMenu/demo/on-dom-element.html, and have encountered an issue.

    1. Right-click on one of the items.
    2. Right-click on a different item.

    The first menu closes, and the second menu pops up, but only for a moment. After that, nothing on the page can be clicked. When clicking anywhere at this stage, the error log in Firefox says:

    Error: TypeError: root.$layer is undefined Source File: http://medialize.github.com/jQuery-contextMenu/src/jquery.contextMenu.js Line: 362

    opened by lmonilsson 13
  • Scrollbar for long context menu

    Scrollbar for long context menu

    I'm trying to use this plugin for a really long list of items. I've tried using CSS overflow-y:scroll and fixed width, but nope, it doesn't work well cause I've got submenus as well. Any suggested workarounds?

    Thanks!

    opened by Crnell 13
  • Security - CVE-2021-41184: Upgrade embedded jQuery UI Position to 1.13+ (v2.x)

    Security - CVE-2021-41184: Upgrade embedded jQuery UI Position to 1.13+ (v2.x)

    This plugin embeds jQuery UI Position v1.12 (https://github.com/swisnl/jQuery-contextMenu/blob/master/dist/jquery.ui.position.js). This version of jQuery UI is susceptible to Cross Site Scripting and is officially unsupported by jQuery UI.

    Upgrading this embedded code to jQuery UI 1.13 closes these known security vulnerabilities.

    CVE: https://www.cve.org/CVERecord?id=CVE-2021-41184 / https://security.snyk.io/vuln/SNYK-JS-JQUERYUI-1767175 jQuery UI: https://jqueryui.com

    opened by Jason-Morcos 0
  • Animations do not work.

    Animations do not work.

    according to the docs: animation:{duration: 250, show: 'fadeIn', hide: 'fadeOut'}``

    however during invocation // position and show context menu opt.$menu.css(css)[opt.animation.show](opt.animation.duration, function () {

    show() is executed on a string literal.

    opened by rafalsk 0
  • use custom svg icons by gulp

    use custom svg icons by gulp

    I try to use custom svg icons in the contextmenu. I try to understand how I could use this instruction (unfortunately I'm new to npm/node.js) https://swisnl.github.io/jQuery-contextMenu/docs/customize.html

    In this issue I found the some practical steps: https://github.com/swisnl/jQuery-contextMenu/issues/492:

    What icons are you using? Are you trying to add SVG icons? If so so the following (with npm installed ;))

    Clone the repository Add the icons to ./src/icons/ Run npm install Run gulp css

    (installed node with as snap on my Ubuntu 20.04 system sudo snap install node --classic --channel=16)

    $ node --version
    v16.15.0
    $ npx --version
    8.5.5
    $ npm --version
    8.5.5
    

    npm install results in:

    npm ERR! While resolving: [email protected]
    npm ERR! Found: [email protected]
    npm ERR! node_modules/karma
    npm ERR!   dev [email protected]"^5.0.2" from the root project
    npm ERR! 
    npm ERR! Could not resolve dependency:
    npm ERR! peer [email protected]"^4.0.0" from [email protected]
    npm ERR! node_modules/karma-qunit
    npm ERR!   dev [email protected]"^4.0.0" from the root project
    

    After removing "karma-qunit": "^4.0.0", it makes more progress. karma-qunit latest version is 4.1.2, so I would guess it could be resolved, but I have no experience yet, so sure I overlooked the right bits.

    After that it throws:

    npm ERR! code 127
    npm ERR! path /home/user/...<path>..../jQuery-contextMenu/node_modules/fibers
    npm ERR! command failed
    npm ERR! command sh -c node build.js || nodejs build.js
    npm ERR! sh: 1: nodejs: not found
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/user/.npm/_logs/2022-05-22T13_49_40_095Z-debug-0.log
    

    Probably this is more miss understanding of the npm tool, and not so much jQuery-contextmenu. But external pointers are welcome.

    Also gulp build-icons does not deliver. It proposes yarn add gulp because no local gulp is found. Trying this, results in similar error and a lot of extra big amounts of logging of messages.. But as new user of these tools, I do not get the right gist from it.

    opened by Klap-in 1
  • Can't get Font Awesome icons working

    Can't get Font Awesome icons working

    I've tried adding them like this: icon: 'fa-trash', icon: 'fa fa-trash' or even icon: 'trash'. In the last case I dont see anything like I'm supposed to, but if I prepend it with fa- or fa fa- I can see some sort of squares or other symbols depending on what icon I attempt to add and what browser I use (Firefox in the screenshot), instead of the appropriate icon.

    Also the text inexplicably becomes bold (as in well, "bold" in the screenshot) if it's added like this: icon: 'fa-trash'. It does not if it's like this: icon: 'fa fa-trash' (at "italic" in the screenshot).

    Font awesome is included and the same icon i.e. trash in this case is successfully rendered elsewhere on the very same page but not in the context menu.

                'bold': {
                    name: 'Bold (CTRL+B)',
                    icon: 'fa-trash',
                    isHtmlName: false,
                    callback: function(itemKey, opt, e){
                        document.execCommand('bold', false, null);
                    }
                },
    

    Screenshot_1

    opened by notchriss 0
  • Make the modal layer let click events passthrough

    Make the modal layer let click events passthrough

    This adds the useModal option, defaults to true for the existing behaviour.

    With useModal set to false, rather than creating a hidden layer behind the contextmenu to capture closing clicks, uses document.addeventlistener in capture mode.

    This allows for propagating click events when clicking in empty space to close the contextmenu (before, only the mousedown event was propagated, and no click was sent since the following mouseup would not be on the same element)

    Note useModal = false might break on older browsers, or some features might not work with it anymore (unlikely though).

    opened by Speedphoenix 0
  • Do beta (v3) docs exist?   The 'v3 Documentation' link goes to v2 Docs currently.

    Do beta (v3) docs exist? The 'v3 Documentation' link goes to v2 Docs currently.

    The repo's v3 branch README has a link to go to the 'v3 docs' but it actually takes you to the v2 docs. See screenshot: v3-docs-missing

    I suspect a decent bit of the confusion is related to this -- the v3 code is much better & is overall just far easier to work with (especially the styling) -- but without documentation, it's a lot of fumbling around to try to figure out what the usage API is.

    Personally, I had inadvertently been trying to use v2 syntax with the v3 codebase -- causes me lots of confusion. Much smoother sailing now that I've realized the issue, though unfortunately I'm going to stick with the v2 implementation, at least for now, at least until v3 has some documentation/examples. And maybe it already does and I'm just too dense to find/see them.

    Nonetheless -- awesome project. Please don't take this as criticism at all BTW! The project is great and, especially the improvements in v3, it looks fantastic & it absolutely satisfies our requirements & more. If anything, I just wanted to relay my experience in hopes of helping the project & others in the future, even if in a very small way!

    Thank you! :)

    opened by ArthurD 0
Releases(2.9.2)
  • 2.9.2(May 13, 2020)

  • 2.9.1(May 6, 2020)

    2.9.1

    • Fix error when closing the menu by clicking on the page without any element under that click point. (fixes #717)
    • Upgrades dependencies
    Source code(tar.gz)
    Source code(zip)
  • 2.9.0(Oct 13, 2019)

  • 2.8.1(Oct 5, 2019)

  • 2.8.0(Jan 16, 2019)

  • 2.7.1(Oct 2, 2018)

  • 2.7.0(Jul 12, 2018)

  • 3.0.0-beta.2(Mar 16, 2018)

  • 2.6.4(Mar 16, 2018)

  • 3.0.0-beta.1(Dec 30, 2017)

    Migrating

    • To migrate, you only need to change all callback functions to the new arguments (icon, build, visible, disabled, item callback and global item callback). Also if you listen to contextmenu events, please check if you still get the correct data.

    Changed

    • Restructured the code to use Webpack with Babel. Build the code with yarn run webpack.
    • Changed linting to ESLint.
    • Moved to BrowserStack for browser testing.
    • Added JSDoc for generated API documentation.
    • Added 3.x documentation on GitHub pages.
    • The previous opt and root arguments are now described as currentMenuData and rootMenuData, which are documented in ContextMenuData.
    • Defined a few callback types to illustrate the arguments with which they are called.
    • Build callback ContextMenuBuildCallback is now function(e, $currentTrigger).
    • Icon callback ContextMenuIconCallback is now function(e, $item, key, item, currentMenuData, rootMenuData).
    • The visibile, disabled, global callback and item callback ContextMenuItemCallback is now function(e, key, currentMenuData, rootMenuData).
    • If you define custom menu item types in $.contextMenu.types they get called as ContextMenuItemTypeCallback with function(e, item, currentMenuData, rootMenuData).
    • All events should always include event data containing the ContextMenuData as described in ContextMenuEvent. So if you listen to contextmenu events you should always have the data available.

    Fixed

    • Add options argument to events.activates. (Issue #580)
    • Fix support for $(element).contextMenu('update') which was broken.
    • Fixed bug in checking visibility of items for menu visibility. If a menu item was defined as { item: { visible: false } } it would not stop the menu from showing.
    Source code(tar.gz)
    Source code(zip)
  • 2.6.3(Oct 30, 2017)

  • 2.6.2(Sep 8, 2017)

  • 2.6.1(Sep 8, 2017)

    Added

    • Ability to define touchstart as trigger (thanks @npuser)
    • Extra event activated that triggers after the menu is activated (thanks @AliShahrivarian)
    • Flag denoting if a second trigger should close the menu (thanks @OliverColeman)
    • Added update call to update visibility, disabled, icon and form value stats for items. Fixes issue (Issue #555).
        $('.context-menu-one').contextMenu('update'); // update single menu
        $.contextMenu('update') // update all open menus
    

    Fixed

    • Fix for out of bounds problem on window edges (thanks @AliShahrivarian)
    Source code(tar.gz)
    Source code(zip)
  • 2.5.0(May 25, 2017)

  • 2.4.5(May 25, 2017)

    Fixed

    • ContextMenu appears with wrong position (Issue #502 thanks @apptaro
    • Check if given selected value is a 0, if it is a zero so return it as is. Thanks @Falseee
    • Events are never trigger when opening a contextMenu right after the other (Issue #454 thanks @kagant15
    • Accesskey jQuery Modal Dialog not working (Issue #506 thanks @CiTRO33
    • Fix submenu hover not always staying active if hovering over a submenu item. (Issue #523 thanks @tim-nz
    • Change $node.click() to $node.get(0).click() to allow native event in HTML5 (Issue #517)
    Source code(tar.gz)
    Source code(zip)
  • 2.4.4(Mar 15, 2017)

  • 2.4.3(Mar 15, 2017)

    Changed

    • The inline style causes a Content Security Policy violation if style-src 'unsafe-inline' is not defined in the policy. PR 498 thanks @StealthDuck

    • Removed GPL license from the comment in the plugin. Was already removed everywhere else. Only MIT applies now.

    Added

    • Added SauceLabs tests for common browsers.
    Source code(tar.gz)
    Source code(zip)
  • 2.4.2(Jan 2, 2017)

  • 2.4.1(Dec 9, 2016)

  • 2.4.0(Dec 9, 2016)

    Added

    • Selectable Sub Menus (Issue #483 thanks @zyuhel

    Fixed

    • The contextmenu shows even if all items are set to visible:false (Issue #473)

    Documentation

    • Update documentation to include demo for async promise fixes (Issue #470)
    Source code(tar.gz)
    Source code(zip)
  • 2.3.0(Oct 25, 2016)

    Added

    • Asynchronous promise support for submenu's (Issue #429) thanks @Ruud-cb for the hard work.
    • Include dist and src in package.json to easily use SCSS files (PR #467) thanks @RoachMech

    Fixed

    • Font family when using font awesome (Issue #433)
    • Add check for opt.$menu is null when handling callbacks. (Issue #462) thanks @andreasrosdal

    Changed

    • Make <input> and <select> tags xhtml compatible (Issue #451) thanks @andreasplesch
    • Update jQuery UI position to 1.12.1

    Documentation

    Source code(tar.gz)
    Source code(zip)
  • 2.2.4(Aug 26, 2016)

  • 2.2.3(Jul 17, 2016)

    Fixed

    • Callbacks are now called from the scope of the menu the item is in (like a submenu). For now they overwrite root callbacks only if the item is not in a submenu, this so the callbacks are always correct. Unfortunately this will also mean the callbacks option is still not complete if you use the same key for an item in any place. Cant fix that easily.
    Source code(tar.gz)
    Source code(zip)
  • 2.2.2(Jul 15, 2016)

    Added

    • Add option to show item title as HTML (thanks @brassard)
    • Full Font Awesome support

    Changed

    • Use relative units for css fixes (Issue #386) (thanks @RoachMech)
    • Change unicode characters in CSS to readable strings.
    • Improved item styles (thanks @anseki)

    Fixed

    • Force woff2 font creation for Windows some machines.
    • Fix so that disabled items can't get focus anymore (thanks @anseki)
    • Fix so menu size is calculated better no items will take up 2 lines again (thanks @anseki)
    • Fix bower.json (thanks @nelson6e65)
    • Fix typo in documentation for "position" and "build" callback (thanks @mmcev106)

    Documentation

    • Documentation added for cm_seperator (thanks @nelson6e65)
    • Fix typo in items options documentation (thanks @nelson6e65)
    • Fix typo in animation: fadeOut (thanks @avi-meslati-sp)
    • Fix typo in docs code: show is used twice (thanks @kgeorgiou)
    • Fix in async documentation.
    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(Jun 13, 2016)

    Added

    • Add option to show item title as HTML (thanks @brassard)
    • Full Font Awesome support

    Changed

    • Use relative units for css fixes (Issue #386) (thanks @RoachMech)
    • Change unicode characters in CSS to readable strings.
    • Improved item styles (thanks @anseki)

    Fixed

    • Force woff2 font creation for Windows some machines.
    • Fix so that disabled items can't get focus anymore (thanks @anseki)
    • Fix so menu size is calculated better no items will take up 2 lines again (thanks @anseki)
    • Fix bower.json (thanks @nelson6e65)
    • Fix typo in documentation for "position" and "build" callback (thanks @mmcev106)
    Source code(tar.gz)
    Source code(zip)
  • 2.1.1(Feb 28, 2016)

    • Fixed a problem when using the open function with custom arguments (thanks @RareDevil)
    • width is increased when repoening menu. Fixed by using outerwidth to calculate width. Fixes #360 (thanks @anseki)
    • Submenus are not collapsed when the menu is closed fixes #358 (thanks @anseki)
    • Small delay in checking for autohide to fix missing the menu by a pixel or two. Fixes #347 (thanks @Risord)
    • Check if an item is not hidden in any way when scrolling through items with the keyboard. Fixes #348
    • Change links and base url of documentation to https as mentioned by @OmgImAlexis in PR#345
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Jan 8, 2016)

    • Added support for providing a function as zIndex value in options object (thanks @eivindga)
    • Fixed a switch to use the correct type for separators (thanks @RareDevil)
    • Fixed the problem with submenus size wrongly (Issue #308) (thanks @RareDevil)
    • Incorrect entry on package.json (Issue #336) (thanks @Dijir)
    • Gray out disabled icons as well as text (Issue #337) (thanks @r02b)
    • Optimized generated CSS so that context-menu-icon class can be used to overwrite icon CSS.
    • Positioning of contextmenu when using appendTo (thanks @mrMarco)
    • Check to see if target have a higher zIndex than the contextmenu in the key event handler (thanks @RareDevil)
    Source code(tar.gz)
    Source code(zip)
  • 1.11.0(Jan 8, 2016)

    • Added support for providing a function as zIndex value in options object (thanks @eivindga)
    • Fixed a switch to use the correct type for separators (thanks @RareDevil)
    • Fixed the problem with submenus size wrongly (Issue #308) (thanks @RareDevil)
    • Incorrect entry on package.json (Issue #336) (thanks @Dijir)
    • Positioning of contextmenu when using appendTo (thanks @mrMarco)
    • Check to see if target have a higher zIndex than the contextmenu in the key event handler (thanks @RareDevil)
    Source code(tar.gz)
    Source code(zip)
  • 2.0.1(Dec 3, 2015)

    • Remove executable bit from jquery.contextMenu.js (thanks @jacknagel)
    • Fixed a problem there was when using a function for icons (thanks @RareDevil)
    • Fixed a problem where submenus resized wrong (thanks @RareDevil)
    • Fixed a problem where the contextmenu would open another menu (thanks @RareDevil) - (Issue #252 and Issue #293)
    • Fixed regression of node name's not being appended to the label of input elements. (thanks @RareDevil)
    • Add check that root.$layer exists, to prevent calling hide() on an defined object. (thanks @andreasrosdal)
    Source code(tar.gz)
    Source code(zip)
  • 1.10.3(Dec 3, 2015)

    • Remove executable bit from jquery.contextMenu.js (thanks @jacknagel)
    • Fixed a problem there was when using a function for icons (thanks @RareDevil)
    • Fixed a problem where submenus resized wrong (thanks @RareDevil)
    • Fixed a problem where the contextmenu would open another menu (thanks @RareDevil) - (Issue #252 and Issue #293)
    • Fixed regression of node name's not being appended to the label of input elements. (thanks @RareDevil)
    • Add check that root.$layer exists, to prevent calling hide() on an defined object. (thanks @andreasrosdal)
    Source code(tar.gz)
    Source code(zip)
A jQuery plugin that creates a paneled-style menu (like the type seen in the mobile versions of Facebook and Google, as well as in many native iPhone applications).

#jPanelMenu ###Version 1.4.1 jPanelMenu is a jQuery plugin for easily creating and managing off-canvas content. Check out the demo (and documentation)

Anthony Colangelo 928 Aug 16, 2022
MultiLevelPushMenu jQuery Plugin implementation

Multi-level-push-menu by Momcilo Dzunic This jQuery plugin is inspired by Codrops MultiLevelPushMenu but unlike it not relaying on CSS 3D Transforms a

Momcilo Dzunic 809 Apr 21, 2022
stickUp a jQuery Plugin for sticky navigation menus.

stickUp a jQuery plugin A simple plugin that "sticks" an element to the top of the browser window while scrolling past it, always keeping it in view.

null 1.6k Nov 23, 2022
Superfish is a jQuery plugin that adds usability enhancements to existing multi-level drop-down menus.

jQuery Superfish Dropdown Menu Plugin Our favourite aquatic superhero returns from his sojourn across the galaxy infused with astonishing, hitherto un

Joel Birch 917 Nov 1, 2022
Slidebars is a jQuery Framework for Off-Canvas Menus and Sidebars into your website or web app.

Slidebars Slidebars is a jQuery Framework for Off-Canvas Menus and Sidebars into your website or web app. Version 2.0 is a complete rewrite which feat

Adam Smith 1.5k Nov 15, 2022
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.

mmenu.js The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp. It is very customiz

Fred Heusschen 2.6k Nov 28, 2022
The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp.

mmenu.js The best javascript plugin for app look-alike on- and off-canvas menus with sliding submenus for your website and webapp. It is very customiz

Fred Heusschen 2.6k Nov 20, 2022
Multi-level contextmenu created in Vanilla Javascript (no css files included)

ContexMenu.js Multi-level ContextMenu Created in Vanilla Javascript (No CSS Files) Import with jsDelivr <script src="https://cdn.jsdelivr.net/gh/L1qui

null 5 Nov 22, 2022
A responsive image polyfill for , srcset, sizes, and more

Picturefill A responsive image polyfill. Authors: See Authors.txt License: MIT Picturefill has three versions: Version 1 mimics the Picture element pa

Scott Jehl 10k Nov 23, 2022
A JSON polyfill. No longer maintained.

?? Unmaintained ?? JSON 3 is **deprecated** and **no longer maintained**. Please don't use it in new projects, and migrate existing projects to use th

BestieJS Modules 1k Nov 20, 2022
A JavaScript polyfill for the HTML5 placeholder attribute

#Placeholders.js - An HTML5 placeholder attribute polyfill Placeholders.js is a polyfill (or shim, or whatever you like to call it) for the HTML5 plac

James Allardice 958 Nov 20, 2022
🎚 HTML5 input range slider element polyfill

rangeslider.js Simple, small and fast jQuery polyfill for the HTML5 <input type="range"> slider element. Check out the examples. Touchscreen friendly

André Ruffert 2.2k Nov 16, 2022
A window.fetch JavaScript polyfill.

window.fetch polyfill The fetch() function is a Promise-based mechanism for programmatically making web requests in the browser. This project is a pol

GitHub 25.5k Nov 23, 2022
Use plain functions as modifiers. Polyfill for RFC: 757 | Default Modifier Manager

Use plain functions as modifiers. Polyfill for RFC: 757 | Default Modifier Manager

null 7 Jan 14, 2022
Polyfill to remove click delays on browsers with touch UIs

FastClick FastClick is a simple, easy-to-use library for eliminating the 300ms delay between a physical tap and the firing of a click event on mobile

FT Labs 18.8k Nov 23, 2022
EventSource polyfill

EventSource polyfill - https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events Installing: You can get the code from npm or

Viktor 1.8k Nov 22, 2022
Javascript client for Sanity. Works in node.js and modern browsers (older browsers needs a Promise polyfill).

@sanity/client Javascript client for Sanity. Works in node.js and modern browsers (older browsers needs a Promise polyfill). Requirements Sanity Clien

Sanity 24 Nov 4, 2022
PouchDB for Deno, leveraging polyfill for IndexedDB based on SQLite.

PouchDB for Deno PouchDB for Deno, leveraging polyfill for IndexedDB based on SQLite. Usage import PouchDB from 'https://deno.land/x/[email protected]

Aaron Huggins 19 Aug 2, 2022
Window.fetch polyfill

window.fetch polyfill This project adheres to the [Open Code of Conduct][code-of-conduct]. By participating, you are expected to uphold this code. [co

null 38 Sep 11, 2020
Polyfill `error.cause`

Polyfill error.cause. error.cause is a recent JavaScript feature to wrap errors. try { doSomething() } catch (cause) { throw new Error('message',

ehmicky 4 Nov 6, 2022