This is the site, http://bragflags.bravehost.com The admin creates templates for the site, I need to preload all the images without regard to the name, just by thier presence in a folder on the server. Optimally I would do it via ajax, anyone know if this is possible without tying up good 'ole single threaded javascript?
a while back a did something similar as i wanted a gallery that just took a folder of images and worked, no setup etc. i never did finish it but the preloading works fine, based on the mootools Asset.images(array) / Asset.image(singleimage); check it here - http://dci.uk.net/gallery/, the list is populated by a php script that produces a simple js array. once preloading has finished, ALL of the images being browsed are cached and shown instantly - some of them are 1-2mb in full screen...
What I like to do is to just load all the pictures hidden ( CSS property "visibility: hidden" ) and then change their visibility based on onmouseover/onmouseout events.
@ dimitar christoff nice script! really helpful. I never get the margin-left/right: -999999 or display:hidden to work I dont know why..