aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/event.js
diff options
context:
space:
mode:
authorBrandon Aaron <brandon.aaron@gmail.com>2009-04-30 21:50:15 +0000
committerBrandon Aaron <brandon.aaron@gmail.com>2009-04-30 21:50:15 +0000
commitaef1989ba74ee568f8bab3ac0967fd849816da12 (patch)
tree9d645518068a95e4b281fd7ea06c1be1f263de2f /test/unit/event.js
parent71efbdd3b26f3a283f8d4bfdcc7b6343142027b9 (diff)
downloadjquery-aef1989ba74ee568f8bab3ac0967fd849816da12.tar.gz
jquery-aef1989ba74ee568f8bab3ac0967fd849816da12.zip
live event handlers now receive data from trigger, fixes #4532, thanks nbubna
Diffstat (limited to 'test/unit/event.js')
-rw-r--r--test/unit/event.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/unit/event.js b/test/unit/event.js
index b2270ad92..dea17a12d 100644
--- a/test/unit/event.js
+++ b/test/unit/event.js
@@ -490,7 +490,7 @@ test("toggle(Function, Function, ...)", function() {
});
test(".live()/.die()", function() {
- expect(53);
+ expect(54);
var submit = 0, div = 0, livea = 0, liveb = 0;
@@ -583,6 +583,10 @@ test(".live()/.die()", function() {
jQuery("#foo").live("click", true, function(e){ equals( e.data, true, "live with event data" ); });
jQuery("#foo").trigger("click").die("click");
+ // Test binding with trigger data
+ jQuery("#foo").live("click", function(e, data){ equals( data, true, "live with trigger data" ); });
+ jQuery("#foo").trigger("click", true).die("click");
+
// Verify that return false prevents default action
jQuery("#anchor2").live("click", function(){ return false; });
var hash = window.location.hash;