});
test("unbind(type)", function() {
- expect( 0 );
+ expect( 1 );
var $elem = jQuery("#firstp"),
message;
$elem.bind("error1 error2.test",error)
.unbind()
.trigger("error1").triggerHandler("error2");
+
+ // Should only unbind the specified function
+ jQuery( document ).bind( "click", function(){
+ ok( true, "called handler after selective removal");
+ });
+ var func = function(){ };
+ jQuery( document )
+ .bind( "click", func )
+ .unbind( "click", func )
+ .click()
+ .unbind( "click" );
});
test("unbind(eventObject)", function() {
// Supports jQuery.Event implementation
equal( event.type, "keydown", "Verify type" );
-
+
// ensure "type" in props won't clobber the one set by constructor
equal( jQuery.inArray("type", jQuery.event.props), -1, "'type' property not in props (#10375)" );