0

http://plugins.jquery.com/project/conmenu

its a plugin for right click menu..... however it has no example usages or illustration or demonstration....

like where can i include additional selector options like top.document, or parent.window.document

$.conmenu({
  selector:".node",
  choices:[{
    label:"Edit",
    action:function(div){
      var nid = $(div).attr("id").substring(5);
      window.location.href = "/node/" + nid + "/edit";
    }
  }]
});
1
  • 1
    There's a usage sample right on the page you linked to: "This example shows a 'Edit' option when you right click on any element that has a class of 'node'" Commented Oct 30, 2009 at 0:46

2 Answers 2

3

I would recommend looking at some other plugins as they are better documented. For example, this plugin has better docs and examples:

http://abeautifulsite.net/2008/09/jquery-context-menu-plugin/

0

It is pretty simple to use, based on the documentation. Just paste in their sample, and then add in some more menu items, using their code as a template, and see what happens.

If you still have problems then you can ask here, showing the code that is causing you problems.

1
  • I have a problem, the following code (from conmenu source) prevents context menu actions from excecution: $(document.body).mousedown(function(){ resetMenu(); }); "choices.action" is executed only if I comment this "resetMenu()" out. body.mousedown() is executed before #conmenu.click() and it seems 'click' event never happens.
    – Nishi
    Commented Nov 3, 2010 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.