aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorrwldrn <waldron.rick@gmail.com>2011-04-05 18:12:50 -0400
committerrwldrn <waldron.rick@gmail.com>2011-04-05 18:55:07 -0400
commit4b0c26f0af96da05ab1a0166268c2925a6e6e6ac (patch)
tree362b6f162f2ee3b458e7b8645f821236b688a3fa /src
parent2ed81b44be958b5f2b5569ab15f22bde262b4eb6 (diff)
downloadjquery-4b0c26f0af96da05ab1a0166268c2925a6e6e6ac.tar.gz
jquery-4b0c26f0af96da05ab1a0166268c2925a6e6e6ac.zip
Ticket #8777 undelegate by namespace
Diffstat (limited to 'src')
-rw-r--r--src/event.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/event.js b/src/event.js
index bc2cf76eb..6fac59c74 100644
--- a/src/event.js
+++ b/src/event.js
@@ -868,10 +868,10 @@ function trigger( type, elem, args ) {
// Create "bubbling" focus and blur events
if ( document.addEventListener ) {
jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
-
+
// Attach a single capturing handler while someone wants focusin/focusout
var attaches = 0;
-
+
jQuery.event.special[ fix ] = {
setup: function() {
if ( attaches++ === 0 ) {
@@ -1027,6 +1027,14 @@ jQuery.each(["live", "die"], function( i, name ) {
return this;
}
+ if ( name === "die" && !types &&
+ origSelector && origSelector[0] === "." ) {
+
+ context.unbind( origSelector );
+
+ return this;
+ }
+
if ( jQuery.isFunction( data ) ) {
fn = data;
data = undefined;
@@ -1184,3 +1192,4 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
});
})( jQuery );
+