Template:Team:BGU Israel/javascript.js
From 2014.igem.org
Line 138: | Line 138: | ||
} | } | ||
} | } | ||
+ | |||
var sd1=null;var sd2=null;var sd3=null;var sd4=null;sd5=null;sd6=null;sd7=null; | var sd1=null;var sd2=null;var sd3=null;var sd4=null;sd5=null;sd6=null;sd7=null; | ||
$(document).ready(function () { | $(document).ready(function () { | ||
Line 168: | Line 169: | ||
$("#strat7").hover( function() {sd7.style.display = "block";}, | $("#strat7").hover( function() {sd7.style.display = "block";}, | ||
function() {sd7.style.display = "none";}); | function() {sd7.style.display = "none";}); | ||
+ | } | ||
+ | ); | ||
+ | |||
+ | $(document).ready(function () { | ||
+ | sd1 = document.getElementById('strat1_text'); | ||
+ | sd2 = document.getElementById('strat2_text'); | ||
+ | sd3 = document.getElementById('strat3_text'); | ||
+ | sd4 = document.getElementById('strat4_text'); | ||
+ | sd5 = document.getElementById('strat5_text'); | ||
+ | |||
+ | }); | ||
+ | |||
+ | |||
+ | $(document).ready(function () { | ||
+ | $("#strat1").hover( function() {sd1.style.display = "block";}, | ||
+ | function() {sd1.style.display = "none"}); | ||
+ | $("#strat2").hover( function() {sd2.style.display = "block";}, | ||
+ | function() {sd2.style.display = "none";}); | ||
+ | $("#strat3").hover( function() {sd3.style.display = "block";}, | ||
+ | function() {sd3.style.display = "none";}); | ||
+ | $("#strat4").hover( function() {sd4.style.display = "block";}, | ||
+ | function() {sd4.style.display = "none";}); | ||
+ | $("#strat5").hover( function() {sd5.style.display = "block";}, | ||
+ | function() {sd5.style.display = "none";}); | ||
+ | |||
} | } | ||
); | ); |
Revision as of 16:10, 15 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;
}
}
function change_pic_hormone() {
img_count=(img_count+1)%4;
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;
}
}
function change_pic_intelligent() {
img_count=(img_count+1)%9;
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;
case 7:
figure1.src = ""; break;
case 8:
figure1.src = ""; break;
} } function test(url){ document.getElementById("pdfObj").setAttribute('data',url); }
var current="april"; function show(idDiv){ $(current).hide(); $(idDiv).show(); current=idDiv; } function menu() {
if($('.left-menu').is(':visible')) { $('.left-menu').hide(); $('.right-menu').hide(); document.getElementById('wiki_menu_button').style.opacity= '0.4'; }else{ $('.left-menu').show(); $('.right-menu').show(); document.getElementById('wiki_menu_button').style.opacity= '1.0'; }
}
var sd1=null;var sd2=null;var sd3=null;var sd4=null;sd5=null;sd6=null;sd7=null;
$(document).ready(function () { sd1 = document.getElementById('strat1_text');
sd2 = document.getElementById('strat2_text'); sd3 = document.getElementById('strat3_text'); sd4 = document.getElementById('strat4_text'); sd5 = document.getElementById('strat5_text'); sd6 = document.getElementById('strat6_text'); sd7 = document.getElementById('strat7_text');
});
$(document).ready(function () {
$("#strat1").hover( function() {sd1.style.display = "block";},
function() {sd1.style.display = "none"});
$("#strat2").hover( function() {sd2.style.display = "block";},
function() {sd2.style.display = "none";});
$("#strat3").hover( function() {sd3.style.display = "block";},
function() {sd3.style.display = "none";});
$("#strat4").hover( function() {sd4.style.display = "block";},
function() {sd4.style.display = "none";});
$("#strat5").hover( function() {sd5.style.display = "block";},
function() {sd5.style.display = "none";});
$("#strat6").hover( function() {sd6.style.display = "block";},
function() {sd6.style.display = "none";});
$("#strat7").hover( function() {sd7.style.display = "block";},
function() {sd7.style.display = "none";});
} );
$(document).ready(function () { sd1 = document.getElementById('strat1_text');
sd2 = document.getElementById('strat2_text'); sd3 = document.getElementById('strat3_text'); sd4 = document.getElementById('strat4_text'); sd5 = document.getElementById('strat5_text');
});
$(document).ready(function () { $("#strat1").hover( function() {sd1.style.display = "block";},
function() {sd1.style.display = "none"});
$("#strat2").hover( function() {sd2.style.display = "block";},
function() {sd2.style.display = "none";});
$("#strat3").hover( function() {sd3.style.display = "block";},
function() {sd3.style.display = "none";});
$("#strat4").hover( function() {sd4.style.display = "block";},
function() {sd4.style.display = "none";});
$("#strat5").hover( function() {sd5.style.display = "block";},
function() {sd5.style.display = "none";});
} );