selectors.bind("contextmenu", function() { });

would not work because you're binding ALL elements that begins with 'eip-'
rather than EACH individual element.


Jörn Zaefferer wrote:
> 
> xmrcivicboix schrieb:
>> the script itself is here:
>> https://crux.baker.edu/~thuynh01/eip/static_pages/eip.js
>>   
> You can simplify begin quite a lot:
> var selectors = $("[EMAIL PROTECTED]");
> selectors.bind("contextmenu", function() {
>     $(this).css("background-color", "transparent");
>     document.oncontextmenu = function(){ return false; };
>     eip.initMenu(selectors[i], e.clientX, e.clientY);
> }).hover(
>     function() { $(this).css("background-color", "red"); },
>     function() { $(this).css("background-color", "transparent"); }
> );
> 
> Not winning 5$ here, but when you apply this and simplify other stuff, 
> it would be much easier to find the actual problem.
> 
> -- 
> Jörn Zaefferer
> 
> http://bassistance.de
> 
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/properly-unbinding-events-will-give-u-%245-if-you-can-figure-it-out-tf2916367.html#a8151746
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to