I'm currently using Jquery 1.4.3. I know that there are newer versions but for compatibility with an existing software we have not updated the library yet.
Im trying to get some data that it is passed using the trigger() function. The trigger function has the following params:
.trigger( eventType [, extraParameters ] )
I would like to get those params from the .click() function which says:
.click( handler(eventObject) )
Im not sure how to get those or if I can use trigger to launch an event and some params and using the click listener I can get those. Does someone know if I can use that combination for emitting events and retrieving params?
The way Im trying is like this:
$("#id").trigger('click', ObjectToPass);
and the listener would be defined as follow:
$("#id").click(function(event){...})
What am I missing?
event.dataevent.datais for data that's supplied at event binding time..click(handler, data)which then gets passed asevent.data. It's separate to any data sent with.trigger().