Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnaucube/class2context
javascript library, to add context menu functionallity to html page
https://github.com/arnaucube/class2context
Last synced: about 9 hours ago
JSON representation
javascript library, to add context menu functionallity to html page
- Host: GitHub
- URL: https://github.com/arnaucube/class2context
- Owner: arnaucube
- License: gpl-3.0
- Created: 2016-07-15T09:53:40.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-04-17T19:57:17.000Z (over 7 years ago)
- Last Synced: 2024-04-16T22:33:53.388Z (7 months ago)
- Language: JavaScript
- Size: 1.01 MB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# class2context
javascript library, to add context menu functionallity to html pageDemo: http://arnaucode.com/demos/class2context
Referenced in: http://www.cssscript.com/lightweight-context-menu-library-class2context-js/
![Alt text](https://raw.githubusercontent.com/arnaucode/class2context/master/class2context_01.gif "downlad and open the demo to test it")
### Installation
```
bower install class2context --save
```### Usage
First, include the files
```html```
Then, for each class, call the function
```js
class2context('className', "title for contextmenu", [["option 1", "function1()"], ["option 2","function2()"]]);
```
Another example:
```js
array=[
[" Menu 1", "function1()"],
[" Menu 2", "function2()"],
[" Menu 3", "function3()"],
];
class2context('demoClass', "Menu Title Here", array);
```