<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js'></script> <script type='text/javascript' src='imgPreload.js'></script> <script type='text/javascript'> $(function(){ $('img').imgPreload() }) </script>Make sure each image to be preloaded has specified width and height attributes, otherwise the spinner will be displaced.
Options Example
$('img').imgPreload({spinner_src: '/img/loader.gif', fake_delay: 100, animation_duration: 200})
This pluign is Copylefted under LGPLv3
You can download this project in either zip or tar formats.
You can also clone the project with Git by running:
$ git clone git://github.com/denysonique/imgPreload
To Jeremy Ashkenas for syntactically sweeting the development of this plugin via awesome CoffeeScript, and thanks to CoffeeScript contributors as well.
To OGK Creative for sponsoring the development of this pluginYou can obtain nice spinners from http://ajaxload.info