On 14/12/06, floepi <[EMAIL PROTECTED]> wrote:
>
> Hi Sam,
>
> hmm but that would remove all click events, right? What if i have another
> plugin which attaches something to the click event of my mainWindow?
>
> It would be great, if the event handler would check if that function is
> already attached to the element before attaching the same function again.
> Has someone raised this issue before and i just missed the discussion about
> it ?
>
> Cheers
>
> Phil

In that case, don't attach as an anonymous connection. I think you
don't even need unclick to remove it (as it should check if that
function is already attached).

function myFunction() {
    alert("foo");
}
$('#mainWindow').click(myFunction);

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to