Bug Tracker

Opened 13 years ago

Closed 12 years ago

#5326 closed bug (worksforme)

Cannot unbind mouseenter/mouseleave events using a 'namespace'

Reported by: ALLPRO Owned by: ALLPRO
Priority: undecided Milestone:
Component: event Version: 1.3.2
Keywords: unbind namespace mouseenter mouseleave Cc:
Blocked by: Blocking:


The unbind(".NAMESPACE") functionality does not work for the mouseenter and mouseleave pseudo-events.



$(el).unbind(".mywidget"); unbind

This unbinds "click.mywidget", but NOT "mouseenter.mywidget".

Even if the event name is added, mouseenter still won't unbind when the namespace is specified...

$(el).unbind("mouseenter.mywidget"); does not work

The only way to unbind mouseenter is to *not* specify the namespace - ie, unbind *all* mouseenter events...

$P.unbind("mouseenter"); works normally

The same thing applies to mouseleave.

The main issue here is that unbinding an event.namespace *should* unbind ALL events that were added using bind("event.namespace").

FYI: I posted this in the dev-forum for feedback, but got no response:


Change History (4)

comment:1 Changed 13 years ago by ALLPRO

There is a typo in this post...

$(el).unbind(".mywidget"); // unbind 

This should be:

$(el).bind("click.mywidget", clickHandler); 
$(el).bind("mouseenter.mywidget", mouseHandler); 
$(el).unbind(".mywidget"); // unbind 


comment:2 Changed 12 years ago by Rick Waldron

Milestone: 1.4
Owner: changed from brandon to ALLPRO
Priority: minorundecided
Status: newpending

Please provide a jsFiddle test case. Thank you.

comment:3 Changed 12 years ago by boushley

I created a jsfiddle for this, but it does not support the bug, rather it shows things functioning properly. http://jsfiddle.net/7pEnE/1/

This fiddle uses the latest jquery and everything functions properly there as well. http://jsfiddle.net/7pEnE/

comment:4 Changed 12 years ago by Rick Waldron

Resolution: worksforme
Status: pendingclosed

Issue no longer exists; 1.4.4-git

Tested with supported versions of:


Note: See TracTickets for help on using tickets.