Joe Joe - 1 year ago 95
HTML Question

redirect after few second on click jquery

i have a small issue, i want to redirect page on click using jquery
here is my code


Now is there any way to delay redirect for 5 second.. i mean when click on button user wait at least 5 second on same page and then redirect to index.php i also tried this but it's not working

} 5000)

Answer Source

Try this:

    setTimeout(function(){ window.location.href='index.php'; }, 5000);       
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download