Mootools Div overlay
could someone maybe give me a small hint on how to do this with moo开发者_如何学JAVAtools.
Basically i have a div like
<div id="center-panel" style="height: 200px; width 200px; background: green;"></div>
i basically want this div tag hidden by default, and then once the user has been on the website for like two minutes i want the div tag to display>
In an onload handler for your site, use setTimeout()
to show the div after 2 minutes:
function showDiv(){
$('center-panel').setStyle('display', 'block');
};
setTimeout(showDiv, 60 * 1000 * 2);
You can see it in action here with a 2 second delay rather than 2 minutes.
精彩评论