Or, right in your opinion:
For the div specified in the class:
<%= link_to_function "Toggle", "$('.some_div').toggle()" %>
For the identifier specified by ID:
<%= link_to_function "Toggle", "$('#some_div').toggle()" %>
(note the hash tag)
Added period to a specific div class and hash to a specific id div
Matt darby
source share