my apology. This method does work; however, it has to be this way:
selectors.bind("contextmenu", function() {
document.oncontextmenu = function(){ return false; };
eip.initMenu (this, e.clientX, e.clientY);
//I tried eip.initMenu (selectors, e.clientX, e.clientY); but didn't
work so I tried this since it refers to itself.
})
Anyways, i THINK i got it working now. I use a flags to trigger true/false
in certain places and was able to make it not draw the menu but not really
unbind it.
Sorry for if I sounded like an ass but I wasn't. Shortcut is awesome! Learn
something new everyday. =)
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#a8152963
Sent from the JQuery mailing list archive at Nabble.com.
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/