I’ve used script.aculo.us before (pre-Rails) to do JS effects like
having a menu link that when clicked shows a sub menu, that kind of
thing.
Now I want to do something very similar but in Rails. Basically I have a
list of summaries displayed in a view. I want to have a link that when
pressed shows the detail.
To do this I would normally have each summary in a DIV, the ID of each
DIV would have a number suffix. The on_click event would pass the suffix
to a JS function which would hide/show (using a script.aculo.us effect)
the relevent DIV containing the detail.
How should I go about this in Rails, in other words is there a helper,
better way of doing it, Javascript views maybe…
Best wishes!