Bootstrap Contextmenu Plugin Demos

Demo #1 (the menu)

Assign a contextmenu to a page element.

Right click here.

$('#demo1').contextmenu('#mymenu1', function(clicked, selected) {
	var message = "You right clicked on the text '" + clicked.text() + "'' and selected option '" + selected.text() + "' in the menu";

Demo #2 (the callback)

Access jQuery methods such as attr() and html() of the clicked element and selected menu item.
Right click on this div and select menu item. Then try again and click on this text!

$('#demo2').contextmenu('#mymenu2', function(clicked, selected) {
	var class = clicked.attr('class');
	var message = "the class attribute of the element you clicked on is '" + class "'!";

Demo #3 (other elements)

This plugin is created to show bootstrap dropdown menu but you are not limited to using dropdown lists. Here is a simple example using a div with iframe.

Right click here..

$('#demo3').contextmenu('#mymenu3', function(clicked, selected) {