Simple jQuery Right Click Menu Plugin

Simple jQuery Right Click Menu Plugin
File Size: 2.88KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

A minimal and fast jQuery plugin that allows you to create a styleable right click popup menu (context menu) within a DOM element.

You might also like:

Basic Usage:

1. Create a right click menu for the container with 'demo' ID.

<div id="demo">
Your main content goes here
</div>

<ul id="menu">
<li>Menu 1</li>
<li>Menu 2</li>
<li>Menu 3</li>
</ul>

2. Include jQuery library and jquery.rightclickmenu.js script at the end of your document.

<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js'></script>
<script src='jquery.rightclickmenu.js'></script>

3. Call the plugin on the container and specify the target context menu.

<script>
(function(){
$('#demo').rightClickMenu('#menu');
})();
</script>

4. Style the menu via CSS to meet your needs.

#demo {
...
}
ul#menu {
...
}
ul#menu li {
...
}
ul#menu li:hover {
...
}

This awesome jQuery plugin is developed by walmik. For more Advanced Usages, please check the demo page or visit the official website.