Author: | idoctnef |
---|---|
Views Total: | 2,222 views |
Official Page: | Go to website |
Last Update: | July 18, 2016 |
License: | MIT |
Preview:

Description:
class2context.js is a lightweight, simple-to-use JavaScript plugin that helps you add a custom context menu to your webpage.
How to use it:
Include the following files into your webpage.
<link rel='stylesheet' href='class2context.css'> <script src='class2context.js'></script>
Create an array of menu items with custom icons and functions when clicked.
array=[ ["<img src='1.png'> Menu 1", "function1()"], ["<img src='2.png'> Menu 2", "function2()"], ["<img src='3.png'> Menu 3", "function3()"], ];
Append the context menu to a specified container like ‘demo’.
class2context('demo', "Menu Title Here", array);