Wait for images to load to be shown

1

I would like to make a system that when the page is requested would show a GIF of load waiting for the images to load, as soon as they load the GIF it disappears and the images are shown. Does anyone know how to do this?

    
asked by anonymous 06.09.2015 / 01:19

1 answer

0

You can use the load () function; and fadeOut (); to make your div disappear. More or less like this:

$(window).load(function(){
    $('#dvLoading').fadeOut(2000);
});

Well, I hope I have helped. Hugs

    
06.09.2015 / 04:50