🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Bootstrap Context Menu is a lightweight jQuery plugin which binds a Bootstrap styled context menu to right click on any container. Compatible with Bootstrap 4/3/2.

Bootstrap context-menu

Documentation

Bootstrap Context Menu

A context menu extension of Bootstrap made for everyone's convenience.

Demo available here: http://rawgit.com/skipperbent/simple-bootstrap-contextmenu/master/index.html

Installation

bower install simple-bootstrap-contextmenu

Example

Create context-menu

<ul id="contextMenu" class="dropdown-menu" role="menu" style="display:none" >     <li><a tabindex="-1" href="#">Action</a></li>     <li><a tabindex="-1" href="#">Another action</a></li>     <li><a tabindex="-1" href="#">Something else here</a></li>     <li class="divider"></li>     <li><a tabindex="-1" href="#">Separated link</a></li> </ul>
$("#myTable td").contextMenu({     menuSelector: "#contextMenu",     menuSelected: function (invokedOn, selectedMenu) {         var msg = "You selected the menu item '" + selectedMenu.text() +             "' on the value '" + invokedOn.text() + "'";         alert(msg);     } });

Adding animation

The css attribute visible will be added to the context-menu when visible. You can use this class to add CSS animations to the context-menu.

License

MIT


You May Also Like