|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is there any way to detect if the image that replaces the original has loaded correctly and failing that ignore the rest of the function?
Thanks. |
|
#2
|
|||
|
|||
|
If you preload your images you can have an environment variable be set by the body onlad event. This variable could switch from false to true and then your function to replace the image should have this statement:
if (nameOfEnvironmentVariable) { // The rest of your function goes here } |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Avoid image switching on mouse over if the image is not loaded yet |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|