1

I am looking to add, via javascript an item to the right click context menu on a website, how do I do that?

I have been looking around the web but have found nothing, so if you have a link to a good article that would be great.

I also know there is some compatibility issues with Opera but I am not worried about that right now.

Thanks, R.

Of course I post and instantly find a good tutorial:

http://luke.breuer.com/tutorial/javascript-context-menu-tutorial.htm

flavour404
  • 6,184
  • 30
  • 105
  • 136
  • So it would still be the browser's context menu, but with something specific to your website added? – Tinister Oct 30 '09 at 21:38

3 Answers3

3

jQuery has Context Menu implementation.
Here is a live demo.

THX-1138
  • 21,316
  • 26
  • 96
  • 160
  • Both links are broken now - has the site been archived, by any chance? – Anderson Green Dec 14 '12 at 20:40
  • Here's a simple implementation of a JQuery context menu that I found: http://stackoverflow.com/questions/4495626/making-custom-right-click-context-menus-for-my-web-app/4502207#4502207 – Anderson Green Dec 14 '12 at 20:41
1

Yahoo!'s YUI library has a nice menu component, which has a ContextMenu. You'll have the same problem you noted with Opera, but across the browsers it works nicely and it's easy to integrate your functions and style the menu.

David Snabel-Caunt
  • 57,804
  • 13
  • 114
  • 132
0

You can also use another jQuery plugin, Audero Context Menu.

Aurelio De Rosa
  • 21,856
  • 8
  • 48
  • 71