Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# class2context
javascript library, to add context menu functionallity to html page

Demo: 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);
```