Turn link to a jQuery icon
Posted
by
Justin Meltzer
on Stack Overflow
See other posts from Stack Overflow
or by Justin Meltzer
Published on 2011-03-20T07:12:56Z
Indexed on
2011/03/20
8:09 UTC
Read the original article
Hit count: 193
I want to turn two "voting" links into jQuery UI icons. One is the upvote link that should be an icon with an up arrow, and one is the downvote link that should be an icon with a down arrow. Here is one of the link's RoR code:
<%= link_to "+1", video_votes_path( :video_id => video.id, :type => "up" ), :method => :post, :remote => true %>
I also want to change the color of the icon when it is clicked, and when it is clicked again, it should change back to its original color. How can I do all of this?
© Stack Overflow or respective owner