joomlafreak wrote:
I need for one application relatively big size background images which change every few seconds. I was wondering if it is possible to load the images one by one using ajax and then set some clause to use it from the DOM after it is loaded for the cycle and not loading it from the server. The second part is easy I feel where I will set up a clause to not load it from the server by ajax but from the div where it is inserted. But how do I load the image first time using ajax. thanks
You don't need AJAX for that, you can just get the browser to download and cache the image using a normal hidden <img> element.
See previous threads: http://groups.google.com/group/jquery-en/search?group=jquery-en&q=image+preload -- Best wishes, Dave Cardwell. http://davecardwell.co.uk/javascript/jquery/