I am making a button, that once you click it, it does a 360* spin, and does a function, I am using jQuery for this. But, the first time you press the button, it does the 360* spin, and after that, not so much. It never does it again until you refresh the page. I'm new to Javascript/jQuery so sorry if it's a super simple fix..
Here is my code.
HTML
<div id="refresh"><a href="javascript:changetop()">
<img src="images/refresh.png" height="50" width="50"/></a>
</div>
JavaScript
function changetop(){
$("#refresh").css({ WebkitTransform: 'rotate(' + '360' + 'deg)'}); $("#refresh").css({ '-moz-transform': 'rotate(' + '360' + 'deg)'}); timer = setTimeout(function() { },1000); }
CSS
#refresh{
-webkit-transition:all 1s ease;
-moz-transition:all 1s ease;
transition:all 1s ease;
}
Any ideas? Thanks for all help in advance.