Team:Tec-Monterrey
From 2012.igem.org
(Difference between revisions)
Line 265: | Line 265: | ||
else { $('#rightControl').show(); } | else { $('#rightControl').show(); } | ||
} | } | ||
+ | //Slide Buttons | ||
+ | $("#s1").click(function() { | ||
+ | currentPos = 0; | ||
+ | manageControls(currentPos); | ||
+ | changeSlide(currentPos); | ||
+ | }); | ||
+ | $("#s2").click(function() { | ||
+ | currentPos = 1; | ||
+ | manageControls(currentPos); | ||
+ | changeSlide(currentPos); | ||
+ | }); | ||
+ | $("#s3").click(function() { | ||
+ | currentPos = 2; | ||
+ | manageControls(currentPos); | ||
+ | changeSlide(currentPos); | ||
+ | }); | ||
+ | $("#s4").click(function() { | ||
+ | currentPos = 3; | ||
+ | manageControls(currentPos); | ||
+ | changeSlide(currentPos); | ||
+ | }); | ||
+ | $("#s5").click(function() { | ||
+ | currentPos = 4; | ||
+ | manageControls(currentPos); | ||
+ | changeSlide(currentPos); | ||
+ | }); | ||
+ | $("#s6").click(function() { | ||
+ | currentPos = 5; | ||
+ | manageControls(currentPos); | ||
+ | changeSlide(currentPos); | ||
+ | }); | ||
+ | function changeSlide(position) { | ||
+ | $('#slideInner').animate({ | ||
+ | 'marginLeft' : sWidth*(-position) | ||
+ | }); | ||
+ | } | ||
+ | window.setInterval(function() { | ||
+ | currentPos++; | ||
+ | if (currentPos >= numSlides) | ||
+ | currentPos = 0; | ||
+ | manageControls(currentPos); | ||
+ | changeSlide(currentPos); | ||
+ | }, 5000); | ||
+ | |||
}); | }); | ||
</script> | </script> |
Revision as of 19:55, 22 September 2012
|
Read more about them in the tabs above. |