animate shake bug
https://stackoverflow.com/questions/46677430/animate-css-shake-not-working
by Augustus Yuan
HTML
<link rel="stylesheet" href="https://rawgit.com/daneden/animate.css/master/animate.min.css">
<body>
<h1><a id="Header" class="Header">My First Heading</a></h1>
<p>My first paragraph.</p>
<div id="animeContent">
</div>
</body>
CSS
body{
background-color: rgb(171, 194, 232);
}
#Header{
display: block;
-webkit-animation-duration: 10s;
-webkit-animation-delay: 2s;
-moz-animation-duration: 3s;
-moz-animation-delay: 2s;
-o-animation-duration: 3s;
-o-animation-delay: 2s;
animation-duration: 3s ;
animation-delay: 2s;
}
JavaScript
$(function(){
var animationName = 'animated shake';
var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend';
$('h1').on('click',function(){
$('#Header').addClass(animationName).one(animationEnd,function(){
$(this).removeClass(animationName);
});
});
});