When I perform actions with a couple of images, I encounter delays because the browser needs to load the images. For example, if I use $('body').append(''); everything works smoothly without any delays.
However, when I try using style="display:none;"
on the image, it doesn't load in the browser and there is still a delay when executing the script.
Do you have any alternative solutions to suggest? Thank you!
Solution:
$('<img/>')[0].src = mouseOverImg;
as suggested in the article "Preloading images with jQuery"