I'm currently doing this:
<%= link_to_function h(course.title), "Element.toggle('course#{course.id}')" %>
Is there a way to:
(a) Extend this so that instead of simply clicking on a title to
toggle the element the user can click on a plus symbol that shows the
div which also changes the plus symbol to a minus symbol. Clicking on
the minus symbol would then hide the div and also change the minus
symbol back to plus. I've seen this on quite a few websites so I
think you know what I'm talking about
(b) Have some effect on toggling the element. I googled around and tried this, but it doesn't seem to work:
<%= link_to_function h(course.title), "Element.toggle('course#{course.id}', 'blind')" %>
Any ideas?