Is there a way to have the same behavior as a link_to ... remote=> true
with javascript?
maybe it's not necessary -
I have a div with the user's name and picture in it.
I want to have the entire div to react to a click and go to the method (users#show
for example) as if it were a link_to.
The problem with link_to is that it creates a href
, making the text linkable etc.
Also, I can't seem to use it to make the whole div clickable, only the text.
In an attempt to explain myself more -
If link_to
corresponds to window.location
in javascript
what is link_to
with :remote=>true
in javascript?