Back to Tutorial
 

Example 7:
Images: Auto-open after 2 seconds Auto-Close


top/left




top/center


top/right



center/left




center/center




center/right



bottom/left




bottom/center




bottom/right



This the code you'd use auto-open any banner.

<script type="text/javascript">
function autoExpand() {
setTimeout("ExpandableBanners.openAd('squaretopleft')",2000);
setTimeout("ExpandableBanners.openAd('squaretopcenter')",2500);
setTimeout("ExpandableBanners.openAd('squaretopright')",3000);
setTimeout("ExpandableBanners.openAd('squarecenterright')",3500);
setTimeout("ExpandableBanners.openAd('squarebottomright')",4000);
setTimeout("ExpandableBanners.openAd('squarecenterbottom')",4500);
setTimeout("ExpandableBanners.openAd('squarebottomleft')",5000);
setTimeout("ExpandableBanners.openAd('squarecenterleft')",5500);
setTimeout("ExpandableBanners.openAd('squarecentercenter')",6000);

setTimeout("ExpandableBanners.closeAd('squaretopleft')",6500);
setTimeout("ExpandableBanners.closeAd('squaretopcenter')",7000);
setTimeout("ExpandableBanners.closeAd('squaretopright')",7500);
setTimeout("ExpandableBanners.closeAd('squarecenterright')",8000);
setTimeout("ExpandableBanners.closeAd('squarebottomright')",8500);
setTimeout("ExpandableBanners.closeAd('squarecenterbottom')",9000);
setTimeout("ExpandableBanners.closeAd('squarebottomleft')",9500);
setTimeout("ExpandableBanners.closeAd('squarecenterleft')",10000);
setTimeout("ExpandableBanners.closeAd('squarecentercenter')",10500);
}
if (document.addEventListener) {
document.addEventListener("DOMContentLoaded",autoExpand);
}
else if (!window.onload) window.onload = autoExpand;
</script>

 


All Examples

Example 1: Images - animated no close button (All Directions)
Example 2: Images - animated no close button - click to open (All Directions)
Example 3: Images - animated with close button (All Directions)
Example 4: Images - animated with close button click to open (All Directions)
Example 5: Images - instant-open with close (All Directions)
Example 6: Images - instant-open no close (All Directions)
Example 7: Images - Auto-open after 2 seconds
Example 8: Flash - w/backup images
Example 9: HTML - Animated with a close button
Example 10: HTML - Animated with no close button

 

Example 11: HTML - Instant-open with no close button
Example 12: Takeover Images Animated
Example 13: Takeover Flash
Example 14: Takeover HTML
Example 15: Corner Page Peel
Example 16: Corner Page Peel with Close button
Example 17: Text
Example 18: Text click to open - with Close button
Example 19: Responsive HTML