jquery-bootstrap-contextmenu
This is a tiny lightweight right-mouseclick contextmenu for jQuery / Bootstrap without all the unnecessary features. The minified version is only 554 bytes in size. It also allows you to show other elements such as div or iframe on right click.
How to use:
Open demo.html to see it in action.
The HTML:
<ul class="dropdown-menu" id="mymenu1"> <li><a href="#">Action</a></li> <li><a href="#">Another action</a></li> <li><a href="#">Something else here</a></li> <li><a href="#">Separated link</a></li> </ul>
The Javascript:
$('#myelement').contextmenu('#mymenu1', function(clicked, selected) { var message = "You right clicked on the text '" + clicked.text() + "'' and selected option '" + selected.text() + "' in the menu"; alert(message); });
And if you like it, share it! =)