time delayed redirect?

Edit:

The problem i face is that HTML5 is all on one index page. So i need
the timer to start on click of the blog link.

Try calling the setTimeout inside a click handler on the blog link,

$('#blogLink').click (function (e) {
   e.preventDefault(); //will stop the link href to call the blog page

   setTimeout(function () {
       window.location.href = "https://stackoverflow.com/questions/9877263/blog.html"; //will redirect to your blog page (an ex: blog.html)
    }, 2000); //will call the function after 2 secs.

});

Try using setTimeout function like below,

setTimeout(function () {
   window.location.href = "https://stackoverflow.com/questions/9877263/blog.html"; //will redirect to your blog page (an ex: blog.html)
}, 2000); //will call the function after 2 secs.

Leave a Comment