diff options
Diffstat (limited to 'test/unit/event.js')
-rw-r--r-- | test/unit/event.js | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/unit/event.js b/test/unit/event.js index 799851dd6..99ed41936 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -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++; }); |