time delayed redirect?

前端 未结 6 1496
花落未央
花落未央 2020-11-27 18:19

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.

<
6条回答
  •  抹茶落季
    2020-11-27 18:52

    Include this code somewhere when you slide to your 'section' called blog.

    $("#myLink").click(function() {
        setTimeout(function() {
            window.navigate("the url of the page you want to navigate back to");
        }, 2000);
    });
    

    Where myLink is the id of your href.

提交回复
热议问题