Theres no problem with doing it like that AFAIK, jquery will take each
matched element and bind it properly.
On 1/3/07, xmrcivicboix <[EMAIL PROTECTED]> wrote:
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
> [email protected]
> 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
[email protected]
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/