Added support for multiple live event handlers, live hover, and live focus/blur (mapped to focusin/focusout). Fixes #5804, #5801, #5852.

This commit is contained in:
Irae Brasil 2010-01-23 11:56:24 -05:00 committed by jeresig
parent b9ca157998
commit 01f72026ec
3 changed files with 80 additions and 9 deletions

View file

@ -864,6 +864,20 @@ test(".live()/.die()", function() {
jQuery("#nothiddendiv div").die("click");
});
test("live with multiple events", function(){
expect(1);
var count = 0;
var div = jQuery("div#nothiddendivchild")
div.live("click submit", function(){ count++; });
div.trigger("click");
div.trigger("submit");
equals( count, 2, "Make sure both the click and submit were triggered." );
});
test("live with change", function(){
var selectChange = 0, checkboxChange = 0;