Added support for .unbind(".test") to unbind all namespaced events on an element.
This commit is contained in:
parent
77da94552e
commit
703e89ba30
2 changed files with 12 additions and 2 deletions
|
@ -109,9 +109,9 @@ jQuery.event = {
|
|||
|
||||
if ( events ) {
|
||||
// Unbind all events for the element
|
||||
if ( types == undefined )
|
||||
if ( types == undefined || types[0] == "." )
|
||||
for ( var type in events )
|
||||
this.remove( elem, type );
|
||||
this.remove( elem, type + (types || "") );
|
||||
else {
|
||||
// types is actually an event object here
|
||||
if ( types.type ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue