开发者

Hiding frame after set amount of time?

I have a page made up of 2 frames (not iframes).

How to achieve that: the top frame will disappear (or appear to 开发者_如何学JAVAdisappear) by shrinking upwards after x seconds? As it disappears, I'd like for the second frame to move up so there is no top bar left.


You could use jQuery to do that with something along these lines

function hideFrame()
{
    $('#framename').slideUp(1000);
}

Then you could use a timeout function to call this:

setTimeout('hideFrame()', 5000); // Change 5000 to whatever you like in milliseconds...

And remember to change '#framename' to whatever yours is called like for an example:

<div id="framename">blah blah</div>

Hope this helps.

(Just noticed you put 'not iframes'...)


I believe you need to utilize setTimeout(), .slideDown(), and slideUp().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜