RightClickMenu jQuery plugin

Download from SourceForge

This is a demo page for the right click menu plugin.

The plugin is super-easy to use.

var menu = [
    { name: "make red", func: function (element) { $(element).css("color", "red"); } },
    { name: "make black", func: function (element) { $(element).css("color", "black"); } }
];
$("element").rightClickMenu(menu);
            

Function takes an array of objects with name and func properties. Name will be displayed on menu, func is a user function that will be executed when user clicks on a menu item. User function will receive the target element as a parameter.

Right-click on paragraphs of text below to see the plugin in action.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla sed nulla id nisi hendrerit aliquam. Curabitur feugiat elementum elit sed lacinia. Praesent at metus ligula. Maecenas eget diam erat. Quisque pellentesque luctus sollicitudin. Suspendisse potenti. Morbi molestie velit a felis blandit congue. Nam at leo tellus, sit amet tincidunt nibh. Vestibulum congue, diam nec gravida accumsan, arcu velit tincidunt purus, nec euismod ante erat nec arcu.
Pellentesque ac ligula nec justo tristique sagittis in sed nulla. Aliquam vehicula lobortis est id lobortis. Duis dui quam, ornare eget sollicitudin et, luctus vel tellus. Vestibulum porttitor vulputate volutpat. Vestibulum consectetur diam eget enim posuere tristique interdum dui pellentesque. Suspendisse placerat, enim vitae auctor auctor, enim tellus ullamcorper lacus, a egestas nulla lorem vitae felis. Proin nisi tellus, ultrices sed bibendum in, tristique ac dui. Quisque sit amet ipsum vel quam congue pretium. Nunc sit amet neque nunc.
Free Web Hosting