javascript – How to create a preload before downloading an image, then create an event

Hello, I have a class to load an image in CSS and make an animation by loading three images, and use a preloader:

                        preload function () {
for (var i = 0; i <arguments.length; i ++) {
imagery[i] = new image ();
imagery[i].src = preload.arguments[i];
}
}



preload (
"../Images/1.jpg"
"../Images/2.jpg"
"../Images/3.jpg"
)

preload ();

It's almost perfect, but now that the problem is that it takes a few seconds to stabilize itself by loading the images, I have to create a load with the first image that, once completed, only loads one. class to view the document. There is a clue and if it was too much to ask to do it without hesitation. Thank you