hello,
I have a page with a background on the background I set in the css file.I want to change itevery 15 sec.
I have 2 images: 1.jpg
and 2.jpg
. my css looks like this
.slide1 {
max-width: 100%;
background-attachment: fixed;
width:100%;
height: 100%;
padding-top: 3em;
position: relative;
background-color: #FFFFFF;
background-image: url('billede/1.jpg');
background-size: auto 70%;
color:#FFFFFF;
background-repeat:no-repeat;
background-position:bottom center;
margin: 0;
}
and this is what makes the background change:
<script>
var arrayOfImages = new Array("billede/green/1.jpg","billede/green/2.jpg");
$(arrayOfImages).each(function () {
$('<img />').attr('src',this).appendTo('body').hide;
});
setInterval(function(){$(".slide3").css("background-image", "url('billede/green/" + parseInt((Math.random()*2)+1) + ".jpg')");},10000);
</script>
but right now when it changes picture, it shows a white background when I start scrolling the background shows. What can I do to change the background without it showing the white background sometimes?