I'm calling some JavaScript from within my PHP code, but I want the second part to hold on for 5 seconds.
I found something like setTimeOut(something, time) (JS) and .delay(time) (JQuery), but none of them seems applicable in my situation.
Here is my PHP:
$feedback = '<script>
$(document).ready(function() {
noty({"text": "Yep, you did it",
"closeButton": true, "closeOnSelfClick": true,
"closeOnSelfOver": false, "modal": false
});
});
</script>
<script>
window.location = "http://www.mysite.be/new/index.php";
</script>';
It's the second part (the window.location) I want to pause for like 5 seconds.
But I can't figure out how to do so. Any suggestions?