<style>
.loader {
position: fixed;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
z-index: 9999;
background: url('load.gif') 50% 50% no-repeat rgb(249,249,249);
}
</style>
In body:
<div class="loader">
<script type="text/javascript">
// Jquery 3.x
$(window).on('load', function() {
$(".loader").fadeOut("slow");
});
</script>
I can not make it work in version 3. Thanks
Edit: The idea is to load an animation while loading the content of the web. (a loader)
The animation should disappear when loading the web. With version 1.x, there were no problems, when migrating to version 3.x and adapting the content, some things worked, others did not.