X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fevent.js;h=d2da8e2412be10b62875cf2f969ebf5a833aac1a;hb=45dfa3b0fc49718c4f00600d1e25a129601d08ee;hp=197406b66bd35646ccb43e807b660fb0460fe119;hpb=9ebb2fc654d51244618e208705e2258fe733058f;p=jquery.git diff --git a/test/unit/event.js b/test/unit/event.js index 197406b..d2da8e2 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -798,6 +798,22 @@ test(".live()/.die()", function() { jQuery('span#liveSpan1').die('click'); }); +test("live with submit", function() { + var count = 0; + + jQuery("#testForm").live("submit", function() { + count++; + return false; + }); + + jQuery("#testForm input[name=sub1]")[0].click(); + jQuery("#testForm input[name=T1]").trigger({type: "keypress", keyCode: 13}); + + equals(2, count); + + jQuery("#testForm").die("submit"); +}); + test("live with focus/blur", function(){ expect(2);