How to preload images without an array? Because There is a lot of images and each way to drive through the array is time consuming. Will something like this be correct?

$('.wrapper img').each(function(){ var att =$(this).attr('src'); var qwe = /(\.\w{3,4}$)/; att=att.replace(qwe,'_q.jpg'); var newI= $('<img src="'+att+'">'); $(this).click(function(){ $('.light img').attr('src',att); }); 

  • There is a document.images there access to all images. - nick_n_a
  • @nick_n_a 3 Initially, the paths to the pictures do not “shine” anywhere - they are not known. - PeGaS

0