Javascript ipad上的预加载问题

Javascript ipad上的预加载问题,javascript,jquery,ios,ipad,Javascript,Jquery,Ios,Ipad,我想为7个动画预加载152个jpg图像。我正在尝试在预加载完animationex前40个图像所需的图像后立即运行单个动画。在所有浏览器中,它都可以正常工作,在android中也可以。但在ipad中,animationbackground图像更改无法顺利运行,直到所有152个图像都无法预加载 function preload(arguments,index) { console.log(index) for(var i=1;i<=eval(imagesPerScreen[i

我想为7个动画预加载152个jpg图像。我正在尝试在预加载完animationex前40个图像所需的图像后立即运行单个动画。在所有浏览器中,它都可以正常工作,在android中也可以。但在ipad中,animationbackground图像更改无法顺利运行,直到所有152个图像都无法预加载

function preload(arguments,index) {
    console.log(index)
    for(var i=1;i<=eval(imagesPerScreen[index][1]-imagesPerScreen[index][0]+1);i++){

        scheen[index][i-1] = new Image();
        scheen[index][i-1].src = arguments[index][eval(i-1)];


        $(scheen[index][i-1]).load(function(){
            imgLoaded++;
            var percent=parseInt((imgLoaded/(imagesPerScreen[index][1]-imagesPerScreen[index][0]+1)*100).toFixed())+8;

            if(!isiPad){
                //document.getElementById("loadingStatus").innerHTML="loading.. "+percent+"%";
                $("#loadingStatus").css('width',percent+'px');


            }
            else{
                //$("#loadingStatus").css('display','none');
                $("#loadingStatus").css('width',percent+'px');  


            }

        }); 

    }


    scheen[index][eval(imagesPerScreen[index][1]-imagesPerScreen[index][0])].onload= function() {

            ++screenLoaded;

            imgLoaded=0;

                $("#rightbutton").css('display','block');   
                $("#rightArea").css('display','block');
                $("#loadingStatus").css('display','none');  
                $("#status").fadeOut("fast");
                $("#preloader").fadeOut("fast");    


            if(waiting){moveNext();}

            if(screenLoaded<7){ 
                preload(pics,index+1)           
            }


    };  }