#11030 closed bug (worksforme)
.trigger(event, extraParameters) does not pass extraParameters to the event handlers
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Versions affected: 1.7.0, 1.7.1 -- on() was only added in 1.7.0.
Browsers: only tested in Chrome (v15).
OS: only tested on Windows.
Issue: When using .trigger('eventName', additionalData), the additional data is not passed in e.data to the event handlers.
jsFiddle: http://jsfiddle.net/HN7q3/13/ -- expected: when clicking either link, their id is displayed, not 'undefined'.
The issue seems to be that jQuery.event.dispatch() only uses the data from the matched handlers, not the data received as argument.
Change History (2)
comment:1 Changed 11 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Ok looks like I didn't read the docs thoroughly enough.. Sorry for wasting time.
Note: See
TracTickets for help on using
tickets.
As documented in the example at http://api.jquery.com/trigger/ , the data passed by .trigger() is in the extra arguments that come after the event.
http://jsfiddle.net/HN7q3/14/