Biomod/2013/OSU/media

From OpenWetWare

(Difference between revisions)
Jump to: navigation, search
Line 78: Line 78:
var counter = 0;
var counter = 0;
 +
var sliderimg = document.getElementById('slider-img');
 +
function next(){
function next(){
counter++;
counter++;
if (counter >= imgs.length){counter = 0;}
if (counter >= imgs.length){counter = 0;}
 +
sliderimg.setAttribute("src", imgs[counter]);
alert(imgs[counter]);
alert(imgs[counter]);
}
}
Line 86: Line 89:
function previous(){
function previous(){
counter--;
counter--;
-
if (counter <= 0 ){counter = imgs.length - 1;}
+
if (counter < 0 ){counter = imgs.length - 1;}
 +
sliderimg.setAttribute("src", imgs[counter]);
alert(imgs[counter]);
alert(imgs[counter]);
 +
}
}

Revision as of 10:42, 29 August 2013


<< Back to Team Pages

Edit

Video Blogs

View the rest of our Video Blog posts on out Youtube Channel!

Photos (under construction)

<<
>>


Views
Personal tools