$$('a.citation').invoke('observe', 'click', callback);

function callback(e){
  e.stop(); // here's your event
  alert(this); // here's your element
  alert(this.up()); // that's how you can access upper element
  alert(e.target); // this should reference element that fired event
}

-- 
View this message in context: 
http://www.nabble.com/How-do-you-use-%24%24%28%29-and-bindAsEventListener-together--tf4324993.html#a12323160
Sent from the RubyOnRails Spinoffs mailing list archive at Nabble.com.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to