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

Leave a Reply