I'm using a jQuery function, which allows to open a link automatically:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('#some')[0].click();
});
</script>
<a id="some" href="https://es.stackoverflow.com/">Automatico</a>
Can you explain to me how to make this function execute but after x
seconds or minutes have passed.
With
setTimeout
will execute after 3 seconds in this case. 1000 milliseconds is equal to 1 minute.Extra:
If you don't need the link you can redirect the page without adding a tag
<a>
, like this:You have to use
setTimeout
.