Hi there
I was wondering if you guys could help me with I think is a relativ simple task.
I would like to set up a custom code button, where when clicked, a function will wait 2 seconds before redirecting to a specific url.
I inspired myself from the w3school.com setTimeout function example but I donāt know how to replace the alarm function with a specific url like www.example.com⦠for example
<button onclick="myFunction()">back home</button>
<script>
function myFunction() {
setTimeout(function(){ alert("Hello"); }, 2000);
}
</script>
Any idea ?
Thank you !