I am using a jQuery plugin called iScroll 4 (iScroll4 Docs), which allows me to touch, swipe, pinch and scroll a scrolling panel. The contents of this scrolling panel are loaded via AJAX and include a horizontal list of images.

This all works fine when first loaded but if I upload some more images and have AJAX update the panel, the iScroll plugin doesn't work anymore!

This is my code... and this works:

// the JS ////////////////////////

&lt;script src="js/iscroll-lite.js"&gt;&lt;/script&gt;
&lt;script&gt;

// start iScroll

var myScroll;
function loaded() {
    setTimeout(function () {
        myScroll = new iScroll('scroll-uploader-photos');
    }, 100);
}
window.addEventListener('load', loaded, false);

// load images to panel for first time

load_previous_uploads(&lt;%=Session("article_id")%&gt;);

// load images function

function load_previous_uploads(article_id) {
    if (article_id != "") {
        var data_str = "article_id="+article_id
        $.ajax({
        type : 'GET',
        data : data_str,
        url : 'ajax/get-uploader-photos.asp',
        dataType : 'html',
        success : function(data) {
            if (data != "") {
                $(".upload_result").html(data);
            }
        }
        });
    }
}
&lt;/script&gt;

// the html //////////////////

&lt;div class="upload_result"&gt;&lt;/div&gt;

// the ajax content from external ASP page (get-uploader-photos.asp)

&lt;div class="scroll-uploader-photos"&gt;
    &lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;&lt;img&gt;
&lt;/div&gt;


If I now go and upload some more images, and on success I run the function load_previous_uploads(), the iScroll plugin then does not work as the sliding panel has been updated and is starting to bug me as to why I cannot fix it. After it stops working, I can simply refresh the page and it all works again, with the new images.

For a better example of what I have:



If anybody can see what is wrong and/or can see a fix, please let me know - I would be soooo grateful!

 MY ATTEMPT **

I thought by calling the iScroll function **loaded()** right after AJAX updates the image panel after an upload, it might fix the problem... but it didn't!!


Question: What am I losing when using extension tubes instead of a macro lens?
Answer: You'll also loose some light with extension tubes. Not to mention you'll loose the cool bokeh of the 100mm lens. Also, zoom lenses will do strange things with extension tubes, zooming out will dramatically change the focus, for instance. Also, from the experience of @rfusca, I understand that the range can be quite limited, maybe only a few inches, depending on the lens. 

Still, the electrical connected ones can be a step somewhere between, and are much better than the screw on lenses that exist.