Remove the onclick option from link_to and add specific classes to hook the onclick event via JS code.