<style>
.icon-container {
width: 100%;
margin: 0 auto;
position: relative;
}
.icon-container img {
display: none;
position: absolute;
top: 0;
left: 0;
width: 100%;
z-index: 1;
}
.icon-container img:first-child,
.icon-container img:nth-child(2) {
display: block;
}
.icon-container img:first-child {
position: relative;
z-index: 100;
}
</style>
HTML
[code]<div class="icon-container">
<img src="images/background2.jpg" />
<img src="images/background3.jpg" />
<img src="images/background4.jpg" />
<img src="images/background5.jpg" />
<img src="images/background6.jpg" />
</div>
jQuery<script>
$(function() {
var container = $('.icon-container');
setInterval(function() {
$('img:first-child').fadeOut(1000, function() {
$(this).appendTo(container).attr({style: ''});
})
}, 3000);
});
</script>
Working sample here
Open in new window
It looks like you are playing youtube videos. Simply get the embed code from youtube.Go to the video, click share, then embed and you get something like this
Open in new window
You can paste the code you get from youtube to your site where the video belongs.