Re: [Rails-spinoffs] Event.observe for href

2006-07-06 Thread Jeremy Kitchen
On Wednesday 28 June 2006 14:12, Sam wrote: > > I'd like to have an onclick triggered by a href, but since href's > > don't have id's, how do I use the Event.observe syntax with an href? > > Just put an ID on the href. It's allowed. or, if you feel like finding the element some other way, use tha

RE: [Rails-spinoffs] Event.observe for href

2006-06-28 Thread Sam
I'd like to have an onclick triggered by a href, but since href's don't have id's, how do I use the Event.observe syntax with an href? Just put an ID on the href. It's allowed. ___ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http

[Rails-spinoffs] Event.observe for href

2006-06-28 Thread Kevin Old
Hello everyone, I'd like to have an onclick triggered by a href, but since href's don't have id's, how do I use the Event.observe syntax with an href? Click me! Event.observe('NOT-SURE-WHAT-TO-PUT-HERE', 'click', function () { Element.toggle($('othercontent')); }, false ); Thanks for an