Answer the question
In order to leave comments, you need to log in
How to rewrite jquery code to javascript?
$('body').before('<div class="load"><img id="ls" src="http://plasmon.rghost.ru/6lWFXm4KD/image.png" alt="" style="position: absolute; top: 50%; left: 50%"></div>');
$(document).ready(function () {
setTimeout(function () {
$('div.load').hide();
$('body').css('display', 'block');
}, 3000);
});
Answer the question
In order to leave comments, you need to log in
It was a long time ago ... I could be wrong ...
var d = document.createElement('div'), di = new Image();
d.className = 'load';
di.src = 'http://plasmon.rghost.ru/6lWFXm4KD/image.png';
di.style = 'position: absolute; top: 50%; left: 50%';
d.appendChild(di);
document.getElementsByTagName('body')[0].insertBefore(d, document.body.firstChild);
document.onload = function(){
setTimeout(function(){
d.style.display = 'none';
document.body.style.display = 'block';
}, 3000);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question