JSFiddle - React, Tailwind, and code Playground

HTML

<p></p>
<div style="text-align:center; margin: 2em;">
    <a href="#hola" class="advert"><img src="http://lorempixum.com/125/125/technics/"/></a>
</div>

CSS

@-webkit-keyframes rotater {
    0% { -webkit-transform:rotate(0)  }
50% { -webkit-transform:rotate(360deg)  }
100% { -webkit-transform:rotate(720deg) }
}

a.advert { display:block; }
a.advert:hover, a.h { 
    /* safari / chrome */
    -webkit-animation-name:rotater; 
    -webkit-animation-duration:500ms; 
    -webkit-animation-iteration-count:1; 
    -webkit-animation-timing-function: ease-out;
    
    /* mozilla */
    -moz-transform:rotate(360deg);
    -moz-transition-duration:500ms;
    -moz-transition-timing-function: ease-out;
    
    /* opera */
    -o-transform:rotate(360deg) scale(2);
    -o-transition-duration:500ms;
    -p-transition-timing-function: ease-out;
    
    /* ie */
    -ms-transform:rotate(360deg) scale(2);
    -ms-transform-duration:500ms;
    -ms-transform-timing-function: ease-out;
}

img { max-width: 200px;}

JavaScript

$(document)ready(function(){
    setTimeout(hoverClass, 1000);
});

function hoverClass(){
    $("a[href='#hola']").toggleClass("h");
}