Hi guys, I wanted to know if it's possible to disable contextmenu from a
given element: span for instance. IE7 doesn't seem to like it very well?
begin: function(){
var selectors = $([EMAIL PROTECTED]);
$.each(selectors, function(i) {
no luck. IE7 says this object does not support this method or property.
wycats wrote:
Try $([EMAIL PROTECTED]).contextmenu(function() { return false; });
-- Yehuda
On 1/2/07, xmrcivicboix [EMAIL PROTECTED] wrote:
Hi guys, I wanted to know if it's possible to disable contextmenu from
no luck. IE7 says this object does not support this method or property.
I think he meant:
$([EMAIL PROTECTED]).bind(contextmenu, function() { return false; });
There's no contextmenu event method, which is what causes the error
that you saw.
--John
Eh. Good point. You should probably be using .bind anyway, even for stuff
like click, to keep your apps future-proof.
-- Yehuda
On 1/2/07, John Resig [EMAIL PROTECTED] wrote:
no luck. IE7 says this object does not support this method or property.
I think he meant:
$([EMAIL
I found a solution:
document.oncontextmenu = function(){return false;};
so when i right click it disable the contextmenu on the body:
then when i bind click event i do:
document.oncontextmenu = function(){return true;};
so when one is on the other is off. Works pretty well with IE's.
wycats