The contextMenu Plugin was designed for web applications in need of menus on a possibly large amount of objects.
Unlike implementations as <ahref="http://abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin/"target="_blank">a beautiful site's</a> or <ahref="http://www.trendskitchens.co.nz/jquery/contextmenu/"target="_blank">trendskitchens'</a> this contextMenu treats the menu as the primary object. That means, that a single menu is defined that can be used by multiple objects. Unlike the mentioned plugins, contextMenu doesn't need to bind itself to triggering objects. This allows injecting and removing triggers without having to re-initialize or update contextMenu.
contextMenu can provide a simple list of clickable commands, or offer an in-menu form. This makes very simple attribute modification possible. See the <ahref="demo.html#inputs">input example</a>.
Once a menu is registered, it cannot be altered. That means no commands can be added or removed from the menu. This allows contextMenu to keep a single definition in memory, which enables it to work with hundreds of trigger objects. contextMenu knows the two callbacks <em>show</em> and <em>hide</em> which can be used to update the state of commands within the menu. This allows en/disabling commands, changing icons or updating the values of contained <input> elements.
And, yes, the icons provided in this demo are taken from a <ahref="http://abeautifulsite.net/blog/2008/09/jquery-context-menu-plugin/">beautiful site</a>,
as well as some implementation ideas…
<li>trigger contextMenu with right-click, left-click, hover or own custom trigger events</li>
<li>delegated event handling removing the need for re-initialization when trigger objects are added / removed</li>
<li>optional icons for commands</li>
<li>input elements (text, textarea, checkbox, radio, select) within the menu</li>
<li>custom html elements (command free)</li>
<li>show/hide callbacks to update the state of commands</li>
<li>small memory footprint even with hundreds of trigger objects</li>
<li>adjust position of menu to fit in viewport</li>