1

I have a unique situation and I will do my best to explain what I am trying to accomplish. I hope I am clear and someone can provide the framework to execute this.

Using WordPress, I would like to inject a landing page or a bit of content on top of any page a visitor hits on my site. For example, a user comes to my site and after 4 seconds all the page content moves down and displays whatever I specify. So I could in fact have google.com show up and push down my page or facebook.com or a big photo of my smiling face. :)

Anyone have any suggestions?

4

1 回答 1

1

您应该能够使用 JQuery 来实现这一点。

查看JSFiddle上的示例

$(function() {
    var wait=2000; //ms to wait

    setTimeout(function() {
        var popdown=$("<div style='background-color:red; border:1px solid black; display:none'>Whatever you want to popdown</div>");

        $('html').prepend(popdown);
        $(popdown).slideDown();
    }, wait);
});​
于 2012-12-21T03:22:00.227 回答