Team:XMU Software/Requirements/js

From 2013.igem.org

function movetotop(){ h = window.innerHeight-180; t = $("#xmu_body").scrollTop(); if(t > h){

$('#safety_navi3').show();

}else{

$('#safety_navi3').hide();

} } $(document).ready(function(e) {

movetotop(); $('#safety_navi3').click(function(){ $("#xmu_body").scrollTop(0); }) }); function navi1(){

document.getElementById("safety_navi1").style.background="#ffd200"; } function navi11(){

document.getElementById("safety_navi1").style.background="#b3d465"; } function navi2(){

document.getElementById("safety_navi2").style.background="#ffd200"; } function navi21(){

document.getElementById("safety_navi2").style.background="#b3d465"; } function navi3(){

document.getElementById("safety_navi3").style.background="#ffd200"; } function navi31(){

document.getElementById("safety_navi3").style.background="#b3d465"; }