-1

Multiple image files being loaded into #elem.

How do I get confirmation when all images completes loading? Below is what I tried but that dosen't work correctly. How do I get a confirmation after the image are loaded?

for(vari=1;i<10;i++){
    if( $('#elem'+i+' .soldIcon' )  ) {
         //do other stuff...
    }
}
Becky
  • 1
  • 9
  • 29
  • 64

1 Answers1

-2

You can use window load completed method. it will be called when all the DOM elements are loaded

$(window).load(function() {
    // your code here
});
Mihir Solanki
  • 333
  • 1
  • 6