What is your goal of disabling the right click. The problem with any technique is that there is always a way around them. console for firefox (firebug) and chrome can cancel this event. or if you want the image to be protected, you can always just look at their temporary cache for images.
If you want to create your own context menu, the preventDefault function is great. Just select your battles here. even a large JavaScript library such as tnyMCE works in all browsers ... and this is not because it is not possible; -).
$(document).bind("contextmenu",function(e){ e.preventDefault() });
Personally, I go more into the open Internet. Native browser behavior should not interfere with page interaction. I am sure that you can find other ways of interaction that are not a right click.
yopefonic Jan 20 '11 at 23:19 2011-01-20 23:19
source share