how to play gif whenever button is clicked in javascript modal

Advertisements i have a modal in javascript, when user clicks the modal button, the modal opens with a gif: var modal = document.getElementById(“myModals”); var btn = document.getElementById(“myBtns”); var span = document.getElementsByClassName(“closes”)[0]; btn.onclick = function() { modal.style.display = “block”; } span.onclick = function() { modal.style.display = “none”; } modal.onclick = function() { modal.style.display = “none”; }… Read More how to play gif whenever button is clicked in javascript modal