[jQuery] Re: Event namespacing - how to see the full event name?

2008-03-25 Thread Andy Matthews
You're allowed to pass in an array object along with each trigger method call. So this might work for you: var call = 1; $('.foo').trigger('bar.update',[call]]); var call = 2; $('.foo').trigger('bar.update',[call]]); $('.foo').bind('bar', function(e,data) { if (data[0] == 1) {

[jQuery] Re: Event namespacing - how to see the full event name?

2008-03-25 Thread Karl Rudd
You're correct about the name-spacing. The name-space comes after the event type: $('.class').bind('click.namespace', function(){//}); $('.class').trigger('click.namespace'); (from: http://docs.jquery.com/Events_%28Guide%29 ) Karl On Wed, Mar 26, 2008 at 5:34 AM, Guy Fraser [EMAIL PROTECTED]

[jQuery] Re: Event namespacing - how to see the full event name?

2008-03-25 Thread Guy Fraser
Yeah, I thought I'd have to use the data feature, it just seems a shame not to have a property on event that provides that info. I did some digging in the jQuery source and found that i's trivial to expose the namespaced event type by inserting the following in to the handle() method before