Skip to content

Commit

Permalink
Fix test suite fail in IE6/7 on event:undelegate - was failing an if …
Browse files Browse the repository at this point in the history
…where it shouldn't
  • Loading branch information
timmywil committed Apr 14, 2011
1 parent 72ddc8c commit 149a040
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down Expand Up @@ -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 );

Expand Down
4 changes: 2 additions & 2 deletions test/unit/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 149a040

Please sign in to comment.