> In your email I assume you didn't, cause you never send the callback to
> unbind, and if you read jQuery source, you'll realize that could help.

Oops - a cut-n-paste typo. I *copied* the .bind command and forgot to
remove the functions.

> Yes, I definitively know namespace, I kinda use them every day

Didn't mean to insult your knowledge. I didn't notice the typo, so had
not idea what ??? was referring to. I just included everything I could
think of that might be confusing.

FYI, this is the actual relevant code from my widget. Additional
namespaced-events may be added to the $P element by other
subroutines...

function create ()

$P
  .bind("mouseenter."+ sID, addHover )
  .bind("mouseleave."+ sID, removeHover )
;

function destroy ()

$P
  .unbind("."+ sID) // remove ALL Layout events
  // TODO: remove these extra unbind commands when jQuery is fixed
  .unbind("mouseenter")
  .unbind("mouseleave")
;

I tested this in both IE7 and FF 3.5 to see if it was not browser-
specific - it's not. It's quick and easy to test it yourself - just
bind and unbind a simple 'alert' function to the mouseenter event of
any element. You will see that the event does not unbind if you
specify a namespace in unbind - with or without the event name.

My assumption is that the mouseenter/leave pseudo-events were
overlooked because of their special nature.

/Kevin

On Oct 5, 11:57 am, Andrea Giammarchi <[email protected]>
wrote:
> Thanks for clarification and Yes, I definitively know namespace, I kinda use
> them every day ... anyway, my reply was because what you wrote is not what
> you should write.
>
> So, to be more clear, have you tried the code I have already posted?
>
> $P
>    .unbind("mouseenter."+ namespace, addHover )
>    .unbind("mouseleave."+ namespace, removeHover )
> ;
>
> In your email I assume you didn't, cause you never send the callback to
> unbind, and if you read jQuery source, you'll realize that could help.
>
> Regards
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to