I have a web page where lots of images called from server using image scr attribute.
I have created a function like which is triggered by td click.
function GoToStep(stepNo) {
var imgSrc = $("#h1" + stepNo).val();
$(".img_vertical").css("background-image", "url(" + imgSrc + ")");
}
Now the problem is this. For slower connections the images come after some moment.
Can I pre load images to avoid waiting time when user clicks td?
I have seen some jquery function to pre load images.
Kindly give some idea how can I achieve it.