Hello folks, below is my code and I would like the animation to loop continuously once click
<div class="w3-container w3-center">
<p id="Demo">Animation is Fun!</p>
<button class="w3-bar-item w3-green " type="button" onclick="myFunction()" class="w3-button">Touch me</button>
</div>
<p>The w3-animate-top class slides in an element from the top.</p>
<script>
function myFunction() {
var x = document.getElementById("Demo");
if (x.className.indexOf("w3-animate-top") == -1) {
x.className += " w3-animate-top";
} else {
x.className = x.className.animate(" w3-animate-top", "");
}
}
</script>