Template:Team:BGU Israel/javascript.js

From 2014.igem.org

Revision as of 19:21, 12 October 2014 by Priels (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

var img_count=0;

       function goToByScroll(id) { $('html,body').animate({ scrollTop: $("#" + id).offset().top }, 'slow'); }

function change_pic() { img_count=(img_count+1)%7; var figure1 = document.getElementById("figure1"); switch(img_count) {

   case 0:
     
      figure1.src = "BGU14PGC-1-1.png";   
       break;
   case 1:
      figure1.src = "BGU14PGC-1-2.png";  
       break;

case 2:

       figure1.src = "BGU14PGC-1-3.png";  
       break;

case 3:

      figure1.src = "BGU14PGC-1-4.png";  
       break;

case 4:

       figure1.src = "BGU14PGC-1-5.png";  
       break;

case 5:

       figure1.src = "BGU14PGC-1-6a.png";  
       break;

case 6:

        figure1.src = "BGU14PGC-1-6b.png";  
       break;

} }