page loader in html code example
Example 1: my loader is continously loading js
$('body').append('<div style="" id="loadingDiv"><div class="loader">Loading...</div></div>');
$(window).on('load', function(){
setTimeout(removeLoader, 2000);
});
function removeLoader(){
$( "#loadingDiv" ).fadeOut(500, function() {
$( "#loadingDiv" ).remove();
});
}
Example 2: how to insert loader in html page
.loader {
border-top: 16px solid blue;
border-right: 16px
solid green;
border-bottom: 16px solid red;
border-left:
16px solid pink;
}