Demo

Right click inside the box to trigger the menu

Demo 1

Using data-toggle="context" to attach a context-menu

Demo 2
This is an area where the context menu is active However, we wont allow it here. But anywhere else in this text should be perfectly fine. This one is started with only javascript
Demo 3

Show the menu name of the item that was selected

Usage

Via data attributes

Add data-toggle="context" to an element that needs a context menu.

<div id="context" data-toggle="context" data-target="#context-menu">
  ...
</div>

Your menu <ul> element must have a dropdown-menu class.

<div id="context-menu">
  <ul class="dropdown-menu" role="menu">
    <li><a tabindex="-1" href="#">Action</a></li>
	...
    <li><a tabindex="-1" href="#">Separated link</a></li>
  </ul>
</div>

Via Javascript

Call the context menus via Javascript:

$('.context').contextmenu();