Re: [jQuery] Wich element triggered an event?

2007-03-09 Thread Jörn Zaefferer
Abel Tamayo schrieb: > Hi all. I'd like to know if there's a standard, easy way to determine > with element triggered an event. I'm pretty sure there is, but can't > find it in google. Maybe an atribute in the e parameter received by > the function like: > > $("p").bind( > "click", > functio

Re: [jQuery] Wich element triggered an event?

2007-03-09 Thread Sam Collett
On 09/03/07, Abel Tamayo <[EMAIL PROTECTED]> wrote: > Hi all. I'd like to know if there's a standard, easy way to determine with > element triggered an event. I'm pretty sure there is, but can't find it in > google. Maybe an atribute in the e parameter received by the function like: > > $("p").bind

Re: [jQuery] Wich element triggered an event?

2007-03-09 Thread Choan C. Gálvez
Hello. On 3/9/07, Abel Tamayo <[EMAIL PROTECTED]> wrote: > Hi all. I'd like to know if there's a standard, easy way to determine with > element triggered an event. I'm pretty sure there is, but can't find it in > google. Maybe an atribute in the e parameter received by the function like: > > $("p"

Re: [jQuery] Wich element triggered an event?

2007-03-09 Thread Jake McGraw
Are you asking which 'p' element triggered the event? If so, you can access it using 'this' reserved word: $("p").click(function(){ $(this).css({backgroundColor:"red"}); // "this" refers to clicked p element }); - jake On 3/9/07, Abel Tamayo <[EMAIL PROTECTED]> wrote: Hi all. I'd like to kno

[jQuery] Wich element triggered an event?

2007-03-09 Thread Abel Tamayo
Hi all. I'd like to know if there's a standard, easy way to determine with element triggered an event. I'm pretty sure there is, but can't find it in google. Maybe an atribute in the e parameter received by the function like: $("p").bind( "click", function(e){ console.log(e.TRIGGER); // This