YUI Image Loader Images Above Fold Not Loading Until Scroll event.

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-04-12T23:40:08Z Indexed on 2010/04/12 23:42 UTC
Read the original article Hit count: 192

Filed under:
|
|

I have a function that is called on the window.onload event to create a group of images and render via the scroll event.

function LoadImages(){  
    var foldGroup = new YAHOO.util.ImageLoader.group(window, 'scroll'); 
    for(var i=0; i<someCounter; i++){
        var locationId = locationsArr[i];
        foldGroup.registerSrcImage('Location_' + locationId, GetImageDomain()+'/templates/Includes/imagehandler.ashx?locationId=' + locationid);
    }
    foldGroup.foldConditional = true; 
    foldGroup.addTrigger(window, 'resize');
}

The problem I'm having is that when the page loads, the images "above the fold" are not rendered until I scroll. Is there any tips on troubleshooting this? I'm totally not a js/frontend guy :)

Thanks in advance!

© Stack Overflow or respective owner

Related posts about yui

Related posts about image