Probably not the optimal solution, but tests pass.

This commit is contained in:
Yehuda Katz 2009-09-16 08:33:00 +00:00
parent 9ebb2fc654
commit 45dfa3b0fc
2 changed files with 53 additions and 1 deletions

View file

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