Fix test suite fail in IE6/7 on event:undelegate - was failing an if where it shouldn't
This commit is contained in:
parent
72ddc8c645
commit
149a040794
|
@ -960,7 +960,7 @@ jQuery.fn.extend({
|
||||||
|
|
||||||
undelegate: function( selector, types, fn ) {
|
undelegate: function( selector, types, fn ) {
|
||||||
if ( arguments.length === 0 ) {
|
if ( arguments.length === 0 ) {
|
||||||
return this.unbind( "live" );
|
return this.unbind( "live" );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return this.die( types, null, fn, selector );
|
return this.die( types, null, fn, selector );
|
||||||
|
@ -1036,7 +1036,7 @@ jQuery.each(["live", "die"], function( i, name ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( name === "die" && !types &&
|
if ( name === "die" && !types &&
|
||||||
origSelector && origSelector[0] === "." ) {
|
origSelector && origSelector.charAt(0) === "." ) {
|
||||||
|
|
||||||
context.unbind( origSelector );
|
context.unbind( origSelector );
|
||||||
|
|
||||||
|
|
|
@ -2027,11 +2027,11 @@ test("delegate with submit", function() {
|
||||||
jQuery(document).undelegate();
|
jQuery(document).undelegate();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("undelegate() with only namespaces", function(){
|
test("undelegate() with only namespaces", function() {
|
||||||
expect(2);
|
expect(2);
|
||||||
|
|
||||||
var $delegate = jQuery("#liveHandlerOrder"),
|
var $delegate = jQuery("#liveHandlerOrder"),
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
$delegate.delegate("a", "click.ns", function(e) {
|
$delegate.delegate("a", "click.ns", function(e) {
|
||||||
count++;
|
count++;
|
||||||
|
|
Loading…
Reference in a new issue