Chris Domigan wrote: > Hi everyone > > The first version of my new ContextMenu plugin has been released. You > can grab it here: Chris,
This is a really nice plugin! One suggestion that springs to mind for it though - the "context" part of context menu always implied to me that the options are relevant to the thing being clicked on. Is there any way to get a callback just before the menu is shown, which is passed the id of the clicked object? This way round, it would allow a single class-selector to add all the menus, even though the specific menu might be slightly different for each item. The situation I am thinking of is in something like Request Tracker (www.bestpractical.com), where you get a list of search results, each of which has a series of verbs that could be applied to it. However, depending on your permissions, you might not be able to perform all of those on all objects. A simple callback that allowed some user-supplied function to mess with the menu a little before it was shown could allow those items to be greyed-out/hidden/whatever based on external data (which is the user's problem, not yours, then). If I get some spare time, I might have a try at add this functionality myself, if other commitments allow, just to get my feet wet with jQuery plugins too :-) Howie _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/