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 6 years ago
demo update 6 years ago
LICENSE Initial commit 7 years ago
README.md update 6 years ago
bower.json update 6 years ago
class2context.css class2context.js first commit 7 years ago
class2context.js small improvement on changing dom solution 7 years ago
class2context_01.gif update 6 years ago
class2context_02.gif update 6 years ago
demoScreen.png readme added 7 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);