I would like to invoke a javascript function (without JQuery) when the onclick even fires from a link_to tag in haml. How can I do this?
Here’s how to do it using Rails link_to in haml:
= link_to "my link", "", :onclick => "my_function(); return false"