siddhant2611
Newbie
- Jul 1, 2017
- 19
- 13
Hello is there any one here who is a proffessionsl web desginer and can help me in learning web designing?
yuvalg 2 ! can u tell me how to make a slider with java script ? I can do it with bootstrap but I want real code ... can u write for me with lil bit of explanation?
<div id="slider">
<img src="#"/>
<img src="#"/>
<img src="#"/>
</div>
<script>
window.onload = function(){
setInterval(slide,2000);
}
function slide(){
//Appending the first img to the end of the list
var container = document.getElementById('slider');
var firstIMG = container.querySelector('img') //The first img child
container.appendChild(firstIMG);
}
</script>