Make sure that .die() with no args works. Fixes #5789.
This commit is contained in:
parent
8ea634fd07
commit
3e286440d5
2 changed files with 19 additions and 4 deletions
|
@ -864,11 +864,26 @@ test(".live()/.die()", function() {
|
|||
jQuery("#nothiddendiv div").die("click");
|
||||
});
|
||||
|
||||
test("die all bound events", function(){
|
||||
expect(1);
|
||||
|
||||
var count = 0;
|
||||
var div = jQuery("div#nothiddendivchild");
|
||||
|
||||
div.live("click submit", function(){ count++; });
|
||||
div.die();
|
||||
|
||||
div.trigger("click");
|
||||
div.trigger("submit");
|
||||
|
||||
equals( count, 0, "Make sure no events were triggered." );
|
||||
});
|
||||
|
||||
test("live with multiple events", function(){
|
||||
expect(1);
|
||||
|
||||
var count = 0;
|
||||
var div = jQuery("div#nothiddendivchild")
|
||||
var div = jQuery("div#nothiddendivchild");
|
||||
|
||||
div.live("click submit", function(){ count++; });
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue