Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1628 How can I preload an animated image, but ensure that it animates once the page has completely loaded?

You are here: irt.org | FAQ | JavaScript | Image | Q1628 [ previous next ]

If you preload the image it will have played by the time it is loaded, therefore Use this to retrigger it:

<body onLoad="if (document.images) document.images['animimg'].src = 'animation.gif?' + Math.random()">

Feedback on 'Q1628 How can I preload an animated image, but ensure that it animates once the page has completely loaded?'

©2018 Martin Webb