Skip to content

Instantly share code, notes, and snippets.

@bougsid
Last active December 14, 2023 18:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bougsid/5475a27b6fddb7c0b0761c75273a1d91 to your computer and use it in GitHub Desktop.
Save bougsid/5475a27b6fddb7c0b0761c75273a1d91 to your computer and use it in GitHub Desktop.
Hide and Show button after x seconds
<script>
var s = 5;
var existCondition = setInterval(function () {
var btns = document.querySelectorAll('.es-popup-button-product');
if (btns.length > 0) {
btns.forEach(function (button) {
button.style.display = 'none';
setTimeout(function() {
button.style.display = 'flex';
}, s * 1000);
});
clearInterval(existCondition);
}
}, 100);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment