I want to change an icon with a loading icon when clicked on a link.
This is happening in a foreach
loop in php/html code.
jQuery works fine, but only in the 1st result. In other results it does not work.
HTML:
<p id= "like">
<a href="..Link" id="like" class="external"><i class="icon-thumbs-up"></i></a>
</p>
jQuery:
$("#like").click(function() {
$("#like").toggle('1000');
$("i", this).toggleClass("icon-loading3");
});
All I want to do is change the class from icon-thumbs-up to icon-loading3 and remove the link!
Thanks for the help ;)