Team:AITM-Nepal
From 2013.igem.org
(Difference between revisions)
Line 206: | Line 206: | ||
img[1] = new Image(); | img[1] = new Image(); | ||
- | img[1].src= "https://static.igem.org/mediawiki/2013/ | + | img[1].src= "https://static.igem.org/mediawiki/2013/c/c0/Aitmbanner_%282%29.png"; |
img[2] = new Image(); | img[2] = new Image(); | ||
Line 214: | Line 214: | ||
function next(){ | function next(){ | ||
- | + | number ++; | |
if (number>0){ | if (number>0){ | ||
number=0; | number=0; | ||
} | } | ||
- | + | document.slider.src = img[number].src; | |
} | } | ||
function prev(){ | function prev(){ | ||
- | + | number --; | |
if (number <0){ | if (number <0){ | ||
number = 2; | number = 2; | ||
} | } | ||
- | + | document.slider.src= img[number].src; | |
} | } | ||
var intervalId = setInterval(function(){ | var intervalId = setInterval(function(){ | ||
- | + | number --; | |
if (number <0){ | if (number <0){ | ||
number = 2; | number = 2; | ||
} | } | ||
- | + | document.slider.src= img[number].src; | |
}, 4000); | }, 4000); | ||
Revision as of 20:06, 21 November 2014