Make sure that .die() with no args works. Fixes #5789.

This commit is contained in:
jeresig 2010-01-23 16:37:12 -05:00
parent 8ea634fd07
commit 3e286440d5
2 changed files with 19 additions and 4 deletions

View file

@ -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++; });