# jquery.ui-contextmenu.js

View project on GitHub

Theme:

### Sample 1

- Initialized using a command-array.
- Entry 'More - Sub1' uses the callback syntax.
- The menu is modified in the `beforeOpen` event (disabling an renaming entries).
- `preventSelect: true` prevents accidential selection of the menu targets (i.e. 'AAA') when double-clicking or dragging the mouse.
- `taphold: true` enables long-press to open the menu (useful on tablet computers).
- Ctrl+Click or two-finger-click on the touchpad also works (MacBook).

Right-click in an element to open the context menu:

AAA BBB CCC

### Sample 3

Open context menu using `$("#container").contextmenu("open", $(".hasmenu:first"))` and close after 2 sec.: