I am trying to let a button pulsate twice after dom ready. I tried first with @-webkit-keyframes pulsate but this is doing the work before everything is loaded. So I guess I need JS.
This is like changing opacity but how to make the button resizing (i.e. increase/decrease padding) instead like a real heart?
$(document).ready(function() {
$(".button").effect("pulsate", {
times: 2
}, 3000);
});
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js">
</script>
<a class="button" href="#" style="padding: 5px 17px;background:red;color:white;">buy now</a>