Customized context menu handling with jQuery
December 7th, 2009Can you think of some times you might want to disable the right click context menu? Or better still, insert your own behavior or application specific context menu?
This is a simple and useful trick:
element.bind('contextmenu',function(e){ //Optional customized handling here return false; });
If you don’t return false, the normal context menu will appear, which could actually be desirable, depending on what exactly you want it to do (say, exiting a field and recording it as dirty).


Previous Post
Next Post

1 Comment
April 12th, 2010 at 4:59 am
Thanks for chiding us, TambourineMan. We promise to do better. And, Julia, that passage you quoted here is one so many of us can relate to ccna
Leave a Reply