Template:Team:BGU Israel/javascript.js
From 2014.igem.org
(Difference between revisions)
(Created page with "var img_count=0; function goToByScroll(id) { $('html,body').animate({ scrollTop: $("#" + id).offset().top }, 'slow'); } function change_pic() { img_count=(img_count+...") |
|||
Line 28: | Line 28: | ||
figure1.src = "https://static.igem.org/mediawiki/2014/c/cc/BGU14PGC-1-6b.png"; | figure1.src = "https://static.igem.org/mediawiki/2014/c/cc/BGU14PGC-1-6b.png"; | ||
break; | break; | ||
+ | |||
+ | } | ||
+ | } | ||
+ | function change_pic_artificial() { | ||
+ | img_count=(img_count+1)%5; | ||
+ | var figure1 = document.getElementById("figure1"); | ||
+ | switch(img_count) { | ||
+ | case 0: | ||
+ | |||
+ | |||
+ | figure1.src = "https://static.igem.org/mediawiki/2014/0/01/BGU14UCP-1-_1.png"; | ||
+ | break; | ||
+ | case 1: | ||
+ | figure1.src = "https://static.igem.org/mediawiki/2014/c/c6/BGU14UCP-1-_2.png"; | ||
+ | break; | ||
+ | case 2: | ||
+ | figure1.src = "https://static.igem.org/mediawiki/2014/4/44/BGU14UCP-1-_3.png"; | ||
+ | break; | ||
+ | case 3: | ||
+ | figure1.src = "https://static.igem.org/mediawiki/2014/7/7f/BGU14UCP-1-_4_b.png"; | ||
+ | break; | ||
+ | case 4: | ||
+ | figure1.src = "https://static.igem.org/mediawiki/2014/5/5b/BGU14UCP-1-_4_c.png"; | ||
+ | break; | ||
+ | |||
} | } | ||
} | } |
Revision as of 08:27, 13 October 2014
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 = ""; break; case 1: figure1.src = ""; break;
case 2:
figure1.src = ""; break;
case 3:
figure1.src = ""; break;
case 4:
figure1.src = ""; break;
case 5:
figure1.src = ""; break;
case 6:
figure1.src = ""; break;
} } function change_pic_artificial() { img_count=(img_count+1)%5; var figure1 = document.getElementById("figure1"); switch(img_count) {
case 0:
figure1.src = ""; break; case 1: figure1.src = ""; break;
case 2:
figure1.src = ""; break;
case 3:
figure1.src = ""; break;
case 4:
figure1.src = ""; break;
}
}