You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
arnaucode cbc1a7d10c update 7 years ago
demo update 7 years ago
LICENSE Initial commit 8 years ago
README.md update 7 years ago
bower.json update 7 years ago
class2context.css class2context.js first commit 8 years ago
class2context.js small improvement on changing dom solution 8 years ago
class2context_01.gif update 7 years ago
class2context_02.gif update 7 years ago
demoScreen.png readme added 8 years ago

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);