});
fakeClick( $anchor2 );
$anchor2.unbind( "click" );
- $main.undelegate( "click" );
+ $main.undelegate( "#foo", "click" );
$anchor2.click(function(e) {
// Let the default action occur
});
});
fakeClick( $anchor2 );
$anchor2.unbind( "click" );
- $main.undelegate( "click" );
+ $main.undelegate( "#foo", "click" );
});
test("bind(), iframes", function() {
});
test(".live()/.die()", function() {
- expect(66);
+ expect(65);
var submit = 0, div = 0, livea = 0, liveb = 0;
jQuery("body").trigger("click");
equals( clicked, 2, "live with a context" );
- // Make sure the event is actually stored on the context
- ok( jQuery._data(container, "events").live, "live with a context" );
-
// Test unbinding with a different context
jQuery("#foo", container).die("click");
jQuery("#foo").trigger("click");
jQuery("#liveSpan1").trigger("foo");
// Run: Handler 1, Default
- // TODO: Namespace doesn't trigger default (?)
jQuery("#liveSpan1").trigger("foo.a");
// Run: remove
});
test(".delegate()/.undelegate()", function() {
- expect(65);
+ expect(64);
var submit = 0, div = 0, livea = 0, liveb = 0;
jQuery("body").trigger("click");
equals( clicked, 2, "delegate with a context" );
- // Make sure the event is actually stored on the context
- ok( jQuery._data(container, "events").live, "delegate with a context" );
-
// Test unbinding with a different context
jQuery("#qunit-fixture").undelegate("#foo", "click");
jQuery("#foo").trigger("click");