![]() Topic awaiting preservation: caching & mouseovers and which way is better? (Page 1 of 1) |
|
---|---|
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Long ago, Bitdamaged provided this script: code: function preLoad(){
code: if (document.images) {
|
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() They both cache images the resaon I like to wrap my preloading script in a function is that when I'm loading images into cache I like to do it after the page loads, I think it's a better user experience. The other method is works as well but it loads all the images into cache before the page even starts to render the rest of the page. code: function changeImages() {
code: function changeImages() {
|
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() Okay, I'm a bit stuck.... code: loaded = 0;
|
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() |
Bipolar (III) Inmate From: Berlin (almost) |
![]() Pugzly- code: document[changeImages.arguments[i]].src = an_image[[b]changeImages.arguments[i+1][/b]].src
quote:
|
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() |