I use the load function to preload Images before applying a hover effect.
$("img").load(function(){ //image preloading
//some function & variable setting
$listingItems.hover(
function(){
//effect
},
function(){
//effect back
}
)
}) // load
the problem i have i that the effects only works if i reload the page. When i first come to the page, the images are loaded but there is no hover effect.
You can take a look at the source here: http://meodai.ch/rundum/shop.html
What have i done wrong? Can anyone help? Is there an other simple way to preload images before executing a function?