Skip to content
javascript library, to add context menu functionallity to html page
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
LICENSE
README.md
bower.json
class2context.css
class2context.js
class2context_01.gif
class2context_02.gif
demoScreen.png

README.md

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

Installation

    bower install class2context --save

Usage

First, include the files

<link rel='StyleSheet' type='text/css' href='class2context.css'>
<script src='class2context.js'></script>

Then, for each class, call the function

class2context('className', "title for contextmenu", [["option 1", "function1()"], ["option 2","function2()"]]);

Another example:

array=[
  ["<img src='1.png'> Menu 1", "function1()"],
  ["<img src='2.png'> Menu 2", "function2()"],
  ["<img src='3.png'> Menu 3", "function3()"],
];
class2context('demoClass', "Menu Title Here", array);
You can’t perform that action at this time.