I have a website which slides to a “section” called blog in my HTML. I want the user to simply see the page for a brief second or 2 then redirect to my blog engine.
Please suggest a time delayed redirect?
If i can redirect with a time delayed based on the click of the blog li:
<li data-target="blog" data-target-activation="click" class="tile icon_add_favourite">
<div>
<h2>Blog</h2><h3>13</h3>
<script type="text/JavaScript">
<!--
setTimeout("location.href = 'http://www.mysite.co.uk/blog';", 1500);
-->
</script>
</div>
</li>
UPDATE: This is sooo strange when the HTML5 slides to the section block the page is still rendering with all the code and therefore the JS should be fired by the click event then run the redirect based on the timer.
The solutions work in JS as the alert boxes pop up. Wonder why they dont work in my page?
Edit:
Try calling the setTimeout inside a click handler on the blog link,
Try using
setTimeoutfunction like below,