JSFiddle - React, Tailwind, and code Playground

by ilyasnone

HTML

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css">
<a href="#"><div class="fa fa-chevron-up icon-update"></div></a>

CSS

.icon-update{
    -moz-transition: all 0.5s linear;
    -webkit-transition: all 0.5s linear;
    transition: all 0.5s linear;
}

.icon-update.up{
    -moz-transform:rotate(180deg);
    -webkit-transform:rotate(180deg);
    transform:rotate(180deg);
}

JavaScript

$(".icon-update").click(function(){
 $(this).toggleClass("up")  ; 
})