What is the way to create a graphic component (more precisely, the twitter.bootstrap icon) on the html website that calls the java script.
You can either make a button or place an icon on it, but it does not look pretty IMHO. Or you can use the href tag,
<a href="#" name="ad_fav" onclick= CALLFUNCTION> <i class="icon"></i></a>
But what is the cleanest way to achieve this? It would be nice if the icon could change after clicking it.
How is this implemented, for example, the upvote button in stackoverflow?
source share