You can attach the event observers for the icons to the row instead (1
per row instead of 1 per icon), let the event "bubble" up from the
icon to the row and use Event.element(e) to determine which icon the
event came from.

You're already doing something similar for highlightRow, except there
you're getting the parent of the element the event bubbles from to see
if it is the row.

Tom


On Aug 9, 5:17 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Each icon changes when you mouseover them, and they also have
> associated behavior when you click on them. If there's a better way to
> associate the events, I'd love to hear it.
>
> nym
>
> On Aug 9, 4:59 pm, Tom <[EMAIL PROTECTED]> wrote:
>
> > Just wondering, but is there any reason that you are adding an event
> > observer per icon?  You should be able to easily add an event observer
> > per row (or for the whole table) and handle the events there, which
> > would considerably cut down on the number of event handlers
> > registered.
>
> > Tom


--~--~---------~--~----~------------~-------~--~----~
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