Submit your widget

right click Looking Context Menu with jQuery

Created 13 years ago   Views 14904   downloads 2733    Author joewalnes
right click Looking Context Menu with jQuery
View DemoDownload
83
Share |

there are loads of context menu plugins already. But they require a fair amount of work to make them look good.

This one is easy to use, small, and looks good.

Features

  • Tiny library. Only dependency is jQuery.
  • Simple API.
  • Looks good out of the box, with no additional tweaking.
  • Designed to look and behave like a standard Windows context menu.
  • There's so little code, it should be easy to add your own custom features.

Usage

$('#mythingy').contextPopup({
  title: 'My Popup Menu',
  items: [
    { label:'Some Item',
      icon:'icons/shopping-basket.png',
      action:function() { alert('clicked 1') } },
    { label:'Another Thing',
      icon:'icons/receipt-text.png',
      action:function() { alert('clicked 2') } },
    /* null can be used to add a separator to the menu items */
    null,
    { label:'Blah Blah',
      icon:'icons/book-open-list.png',
      action:function() { alert('clicked 3') } }
  ]);