Saturday, 10 August 2013

I am trying to put a play button in my image gallery

I am trying to put a play button in my image gallery

I am trying to put a play button in my image gallery. I have a small pice
of code that needs work,but my problem is getting the images to display
one at a time. The code below brings up all the pictures at once. What I
am wondering is if I can work this by classname or will I need to build an
array and work from that. This is the code that partialy works showing all
at once. I think I am just missing something simple.
<script>
function slide_show() {
var slides = document.getElementsByClassName("s"),
i = slides.length;
for(i=0; i<15; i++) {
slides[i].style.visibility = "visible";
slides[i].style.transition="visibility 5s ease 5s"
}
}
</script>

No comments:

Post a Comment