Shadow_ua,
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<style type="text/css">
.list-button {
border: 5px solid Blue;
}
.loader-button {
-webkit-animation: color .5s ease-in-out 4;
-moz-animation: color .5s ease-in-out 4;
-o-animation: color .5s ease-in-out 4;
animation: color .5s ease-in-out 4;
}
#button{
border-radius: 8px;
background: #696969;
font-size: 48px;
color: #FFFFFF;
width:100px;
height:100px;
}
#button:focus{
outline: none;
}
@keyframes color {
0% {
background-color: #FF0000;
}
17%{
background-color: #FFA500;
}
34%{
background-color: #FFFF00;
}
51%{
background-color: #008000;
}
68% {
background-color: #0000FF;
}
85%{
background-color: #000080;
}
100%{
background-color: #800080;
}
}
@-webkit-keyframes color {
0% {
background-color: #FF0000;
}
17%{
background-color: #FFA500;
}
34%{
background-color: #FFFF00;
}
51%{
background-color: #008000;
}
68% {
background-color: #0000FF;
}
85%{
background-color: #000080;
}
100%{
background-color: #800080;
}
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function(){
$('#button').on({'click': function(){
$(this).toggleClass('loader-button list-button');
},'webkitAnimationEnd animationend' : function() {
$(this).trigger('click')
}});
});
</script>
</head>
<body>
<input id="button" name="" type="button" value="go" class="list-button">
</body>
</html>