Код
<script type="text/javascript">
function showImg(){
var imgBg=new Array()
imgBg[0]='/images/sample-1.jpg';
imgBg[1]='/images/sample-2.jpg';
imgBg[2]='/images/sample-3.jpg';
imgBg[3]='/images/sample-4.jpg';
var u=imgBg[Math.floor(Math.random()*imgBg.length)],c=new Image();c.src=u;
if(!c.complete){c.onload=function(){document.getElementById('home').style.background='url('+u+') no-repeat fixed ';setTimeout('showImg()',2000); $("#home").css("background-size", "cover");}}
else{document.getElementById('home').style.background='url('+u+') no-repeat fixed';setTimeout('showImg()',2000); $("#home").css("background-size", "cover");}
};setTimeout('showImg()',2000);
</script>
Добавлено (03.03.2016, 17:57)
---------------------------------------------
Цитата waak (

)
вы
p.s. ко мне на ты обращайся, а то меня это вымораживает)))