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

Yet another jQuery context menu plugin which attaches a custom, dynamic right-click menu to any DOM element.

context-menu

Documentation

JqContextMenu

Custom context menu builder Jquery plugin

Creating an Menu

$('#content').jqContextMenu({     contextMenu: [{             icon: 'lnr lnr-pencil',             text: 'Edit',             dataKey: 'edit'         },         {             icon: 'lnr lnr-file-empty',             text: 'Copy',             dataKey: 'copy'         },         {             icon: 'lnr lnr-bookmark',             text: 'Add to Bookmarks',             dataKey: 'bookmark'         },         {             icon: 'lnr lnr-pie-chart',             text: 'Stats',             dataKey: 'stats',         },         {             icon: 'lnr lnr-trash',             text: 'Delete',             dataKey: 'bookmark'         }     ] });

Handling clicks

$(document).on('mousedown', '#content #jqcontext-menu li', function () {     var dataKey = $(this).attr('data-key');      if (dataKey == 'edit'){         alert('you clicked "edit" button');     } else {         alert('you clicked ' + dataKey+ ' button');     } });

You May Also Like