From: timmywil Date: Thu, 14 Apr 2011 03:10:32 +0000 (-0400) Subject: Fix test suite fail in IE6/7 on event:undelegate - was failing an if where it shouldn't X-Git-Tag: 1.6b1~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=149a040794b3b52bc392281fab68aba40c7018ce;p=jquery.git Fix test suite fail in IE6/7 on event:undelegate - was failing an if where it shouldn't --- diff --git a/src/event.js b/src/event.js index dd48e7f77..bfd263078 100644 --- a/src/event.js +++ b/src/event.js @@ -960,7 +960,7 @@ jQuery.fn.extend({ undelegate: function( selector, types, fn ) { if ( arguments.length === 0 ) { - return this.unbind( "live" ); + return this.unbind( "live" ); } else { return this.die( types, null, fn, selector ); @@ -1036,7 +1036,7 @@ jQuery.each(["live", "die"], function( i, name ) { } if ( name === "die" && !types && - origSelector && origSelector[0] === "." ) { + origSelector && origSelector.charAt(0) === "." ) { context.unbind( origSelector ); diff --git a/test/unit/event.js b/test/unit/event.js index 687184294..1710f6f98 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -2027,11 +2027,11 @@ test("delegate with submit", function() { jQuery(document).undelegate(); }); -test("undelegate() with only namespaces", function(){ +test("undelegate() with only namespaces", function() { expect(2); var $delegate = jQuery("#liveHandlerOrder"), - count = 0; + count = 0; $delegate.delegate("a", "click.ns", function(e) { count++;