document.addEventListener("DOMContentLoaded", function() { var URLS = [ '1.jpg','2.jpg','...' ]; var xload = new seqLoad(URLS); xload.load(); });