What is the way for having a graphical component (more precisely a twitter.bootstrap icon) in an html website calling a java script.
One could either make a button and putting the icon on it, but this does not look nice IMHO. Or one could use the href tag,
<a href="#" name="ad_fav" onclick= CALLFUNCTION> <i
class="icon"></i></a>
But what is the cleanest way of achieving this? It would also be nice if the icon could change after it was clicked.
How it for example the upvote button in stackoverflow implemented?