]> source.dussan.org Git - jquery.git/commitdiff
Fix test suite fail in IE6/7 on event:undelegate - was failing an if where it shouldn't
authortimmywil <tim.willison@thisismedium.com>
Thu, 14 Apr 2011 03:10:32 +0000 (23:10 -0400)
committertimmywil <tim.willison@thisismedium.com>
Thu, 14 Apr 2011 03:14:14 +0000 (23:14 -0400)
src/event.js
test/unit/event.js

index dd48e7f777056f5ddb900565be63a49395573fa3..bfd26307889c02a4d6a0fa74acdd12a0c19081db 100644 (file)
@@ -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 );
 
index 6871842943d791337ffbe99b75814ebd01c0b9eb..1710f6f98103e8bb4db48db12d27b281e89788ba 100644 (file)
@@ -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++;