Wednesday, 18 September 2013

Preload Images with CSS, Javascript or Ajax

See here for many ways to achieve this...

Personally I'm sticking with the following...

Note the type check for array in this example is probably overkill, as it is for all browser versions, we could have used jQuery isArray instead, or even Array.isArray in ECMA script 5 (IE 9 or higher).

No comments:

Post a Comment