Script Categories













Page Details >>> Delayed Gif.

Normally, animated GIF images start as soon as they are loaded on the page. But, if your GIF only loops once, it displays before the rest page is completely visible. This JavaScript solution ensures that the page is fully loaded before the animated GIF begins.

Step 1: Add the below code to the <body> section of your page:

<script language="javascript" type="text/javascript">      
/* Visit http://www.yaldex.com/ for full source code
and get more free JavaScript, CSS and DHTML scripts! */
<!-- Begin
var preload = new Image();
// Change this to the web address of your animated GIF image
preload.src = "profits.gif";

function doGIF() {
document['button'].src = preload.src;
}
window.onload=doGIF;
//  End -->
</script>
<img name="button" src="blank.gif" width=130 height=79>

Step 2: The script uses 2 images as part of its interface. You can create your own, or use the 2 below (resized for easier download):

(right click images, and select "Save Image As")
Upload them into the same directory as your webpage.

JavaScript Editor Get Advanced
JavaScript and Ajax Editor,
Validator and Debugger!

1st JavaScript Editor.



Code was highlighted by 1st JavaScript Editor (The Best JavaScript Editor!).




©