纯JavaScript右键上下文菜单插件 javascript library, to add context menu functionallity to html page

A

This is a demo
Just need to include the files:
  • class2context.js
  • class2context.css

Get started!

Right click over me!
element inside element with diferent class

Use

when html is charged, call the function

Use

when html is charged, call the function:
class2context(
'className',
"title",
[["option1", "functionoption1()"], ["option 2","functionoption2()"]]
);