Good day. I want to implement a simple image slider on Jquery, but so that during initialization only the first 2 images are loaded. The third should be loaded in the event that a person switched to the second. And so on - the download of the next only if you view the previous one. I ask to send me on the right path, it is possible without a ready implementation (although I will not refuse it).

    1 answer 1

    When showing the N-th image - load N + 1 in this way:

    nextImg= new Image(); nextImg.src= '%имя файла N+1%'; 

    and then it depends on your slider, either create a new '<img />', or change the attribute on the old one:

     $('#imgid').attr('src', nextImg.src); 
    • all ingenious is easy :) - M03G