CURRENT VERSION: Version 0.2.5 – RightContext is no longer just a right click context menu, and can be triggered by Left, Right clicks, or mouse over events! Thanks for all those who posted feedback – It REALLY helped!
This release also contains all previous fixes (discussed in the comments below), plus conditional display of menu items based on tag values (more in the comments and the docs).
0.2.5 fixes issues reported with Firefox 3.
RightContext is a supercharged
RightContext generates unique context menus that are built based on the DOM element clicked using special attributes embedded in the element’s Html. The attributes are custom generated and can be anything.
Menu items can include [tags] referencing those attributes, which will cause them to be transformed to contain the actual values when the menu is constructed (i.e., when an element is right clicked.)
The main features of RightContext are:
- Trigger menus via left or right clicks, or by mouse over events (new in 0.2.4)
- Menu items that link somewhere
- Menu items that display hard coded text
- Menu items that retrieve text via a remote ‘ajax’ call
- Menu item separators
- Image icons for menu items
- Supports multiple different menus that can be called depending on the element clicked
- All menu items can contain [tags] which are transformed at runtime to the values embedded in the clicked element
- Conditional evaluation of menu items. An item can show or not show depending on a specified condition in the menu template (new in v0.2.3)
- CSS based look and feel
The script is very simple to use. You simply define your menu ‘templates’ and add a ‘context’ attribute (and any additional custom ones you need) to each element you’d like to have a context menu:
context="actionsMenu" attr1="name" attr2="email@example.com" .....
The code is free to use and modify for any purpose. There’s more information and usage instructions in the code itself as comments.