Jörn Zaefferer schrieb:
> Klaus Hartl schrieb:
>>> Talking about verbosity, isn't fxFade and fxSlide and fxShow and fxHide 
>>> somewhat verbose?
>>>     
>> Jörn, I think not. If I've had that documented already you would know 
>> why not :-)
>>   
> Cool.
>>   
>> I already tried that with my new history/hijax plugin. But I had the 
>> need to pass in the 'e' object, which isn't possible in trigger...
>>
>> I needed e.clientX to distinguish between a true click and a triggered 
>> click event. Maybe someone has an alternative idea for that?
>>   
> Could you explain that in more detail?
> 
> -- Jörn


The code looked like this:

$('a.remote')
     .bind('history', function() {
         ...
     })
     .click(function(e) {
         $(this).trigger('history');
         ...
     });

What I needed is to pass e from the click event to the trigger, or 
generally speaking, to pass the event object of the event that triggered 
the custom event. Not sure if it would be possible to add that 
information to the event object of the custom event.

Or something like the following would be useful:

$(this).trigger('history', [argument, anotherArgument]); // triggers 
history handler function with the arguments passed in...


-- Klaus




_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to