Team:BIT/index.js

From 2014.igem.org

(Difference between revisions)
 
(6 intermediate revisions not shown)
Line 1: Line 1:
// JavaScript Document
// JavaScript Document
-
/*横向二级导航*/
+
 
-
$(document).ready(function(){
+
-
$('ul.one').hide();
+
-
+
-
//Open Menu
+
-
$('.nav li').hover(
+
-
function(){
+
-
var openMenu= $(this).children('ul.one');
+
-
$(openMenu).show();
+
-
},
+
-
function(){
+
-
var openMenu= $(this).children('ul.one');
+
-
$(openMenu).hide();
+
-
});
+
-
+
-
//Open Sub Menu
+
-
/* $('.one#sub-menu').css({
+
-
'left':'80%',
+
-
'top':'0'
+
-
});
+
-
$('.one li').hover(
+
-
function(){
+
-
var subMenu=$(this).children('.one#sub-menu');
+
-
$(subMenu).css({
+
-
'left':'100%',
+
-
'top':'10%',
+
-
})
+
-
});*/
+
-
+
-
+
-
});
+
/*图片变色*/
/*图片变色*/
Line 36: Line 6:
   $("#project").mouseover(function(){
   $("#project").mouseover(function(){
     $("#project").attr("src","https://static.igem.org/mediawiki/2014/e/e0/BIT_Project.gif");
     $("#project").attr("src","https://static.igem.org/mediawiki/2014/e/e0/BIT_Project.gif");
 +
$("#tooltip1").css("margin-top",90);
 +
$("#tooltip1").css("margin-left",80);
 +
  });
  });
   $("#project").mouseout(function(){
   $("#project").mouseout(function(){
Line 44: Line 17:
   $("#team").mouseover(function(){
   $("#team").mouseover(function(){
     $("#team").attr("src","https://static.igem.org/mediawiki/2014/a/ad/BIT_team2.png");
     $("#team").attr("src","https://static.igem.org/mediawiki/2014/a/ad/BIT_team2.png");
 +
$("#tooltip2").css("margin-top",10);
 +
$("#tooltip2").css("margin-left",420);
 +
//$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi");
  });
  });
   $("#team").mouseout(function(){
   $("#team").mouseout(function(){
     $("#team").attr("src","https://static.igem.org/mediawiki/2014/d/d7/BIT_team.png");
     $("#team").attr("src","https://static.igem.org/mediawiki/2014/d/d7/BIT_team.png");
 +
       });
       });
});
});
Line 52: Line 29:
   $("#notebook").mouseover(function(){
   $("#notebook").mouseover(function(){
     $("#notebook").attr("src","https://static.igem.org/mediawiki/2014/7/7a/BIT_notebook2.png");
     $("#notebook").attr("src","https://static.igem.org/mediawiki/2014/7/7a/BIT_notebook2.png");
-
  });
+
$("#tooltip6").css("margin-top",380);
 +
$("#tooltip6").css("margin-left",100);
 +
//$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi");
 +
});
   $("#notebook").mouseout(function(){
   $("#notebook").mouseout(function(){
     $("#notebook").attr("src","https://static.igem.org/mediawiki/2014/2/2f/BIT_notebook.png");
     $("#notebook").attr("src","https://static.igem.org/mediawiki/2014/2/2f/BIT_notebook.png");
Line 60: Line 40:
   $("#human").mouseover(function(){
   $("#human").mouseover(function(){
     $("#human").attr("src","https://static.igem.org/mediawiki/2014/f/fb/BIT_Human.gif");
     $("#human").attr("src","https://static.igem.org/mediawiki/2014/f/fb/BIT_Human.gif");
 +
$("#tooltip4").css("margin-top",580);
 +
$("#tooltip4").css("margin-left",700);
 +
//$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi");
  });
  });
   $("#human").mouseout(function(){
   $("#human").mouseout(function(){
Line 68: Line 51:
   $("#inter").mouseover(function(){
   $("#inter").mouseover(function(){
     $("#inter").attr("src","https://static.igem.org/mediawiki/2014/3/39/BIT_inter2.png");
     $("#inter").attr("src","https://static.igem.org/mediawiki/2014/3/39/BIT_inter2.png");
 +
$("#tooltip5").css("margin-top",360);
 +
$("#tooltip5").css("margin-left",700);
 +
//$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi");
  });
  });
   $("#inter").mouseout(function(){
   $("#inter").mouseout(function(){
Line 76: Line 62:
   $("#model").mouseover(function(){
   $("#model").mouseover(function(){
     $("#model").attr("src","https://static.igem.org/mediawiki/2014/1/1d/BIT_model2.png");
     $("#model").attr("src","https://static.igem.org/mediawiki/2014/1/1d/BIT_model2.png");
 +
$("#tooltip7").css("margin-top",480);
 +
$("#tooltip7").css("margin-left",450);
 +
//$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi");
  });
  });
   $("#model").mouseout(function(){
   $("#model").mouseout(function(){
Line 84: Line 73:
   $("#device").mouseover(function(){
   $("#device").mouseover(function(){
     $("#device").attr("src","https://static.igem.org/mediawiki/2014/9/9d/BIT_Device.gif");
     $("#device").attr("src","https://static.igem.org/mediawiki/2014/9/9d/BIT_Device.gif");
 +
$("#tooltip3").css("margin-top",50);
 +
$("#tooltip3").css("margin-left",680);
 +
//$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi");
  });
  });
   $("#device").mouseout(function(){
   $("#device").mouseout(function(){
Line 89: Line 81:
       });
       });
});
});
-
 
-
 
-
/*横向导航*/
 
-
$(document).ready(function(){
 
-
$(".nav li").mouseover(function(){
 
-
$(this).css("background","rgba(255,255,255,0.5)")
 
-
});
 
-
$(".nav  li").mouseout(function(){
 
-
$(this).css("background","none")
 
-
});
 
-
});
 
-
 
-
 
-
/*human_practice切换文字*/
 
-
$(document).ready(function(){
 
-
$("#photo1").click(function(){
 
-
$("#big").css("background","url(../img/BIT_photo1.png)")
 
-
$("#text1").css("display","block")
 
-
$("#text2").css("display","none")
 
-
$("#text3").css("display","none")
 
-
$("#text4").css("display","none")
 
-
})
 
-
$("#photo2").click(function(){
 
-
$("#big").css("background","url(../img/BIT_photo2.png)")
 
-
$("#text2").css("display","block")
 
-
$("#text1").css("display","none")
 
-
$("#text3").css("display","none")
 
-
$("#text4").css("display","none")
 
-
})
 
-
$("#photo3").click(function(){
 
-
$("#big").css("background","url(../img/BIT_photo3.png)")
 
-
$("#text3").css("display","block")
 
-
$("#text2").css("display","none")
 
-
$("#text1").css("display","none")
 
-
$("#text4").css("display","none")
 
-
})
 
-
$("#photo4").click(function(){
 
-
$("#big").css("background","url(../img/BIT_photo4.png)")
 
-
$("#text4").css("display","block")
 
-
$("#text2").css("display","none")
 
-
$("#text3").css("display","none")
 
-
$("#text1").css("display","none")
 
-
})
 
-
})
 

Latest revision as of 14:04, 16 October 2014

// JavaScript Document

/*图片变色*/

$(document).ready(function(){

 $("#project").mouseover(function(){
   $("#project").attr("src","BIT_Project.gif");

$("#tooltip1").css("margin-top",90); $("#tooltip1").css("margin-left",80);

});

 $("#project").mouseout(function(){
   $("#project").attr("src","BIT_project.png");
     });

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

 $("#team").mouseover(function(){
   $("#team").attr("src","BIT_team2.png");

$("#tooltip2").css("margin-top",10); $("#tooltip2").css("margin-left",420); //$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi"); });

 $("#team").mouseout(function(){
   $("#team").attr("src","BIT_team.png");
     });

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

 $("#notebook").mouseover(function(){
   $("#notebook").attr("src","BIT_notebook2.png");

$("#tooltip6").css("margin-top",380); $("#tooltip6").css("margin-left",100); //$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi"); });

 $("#notebook").mouseout(function(){
   $("#notebook").attr("src","BIT_notebook.png");
     });

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

 $("#human").mouseover(function(){
   $("#human").attr("src","BIT_Human.gif");

$("#tooltip4").css("margin-top",580); $("#tooltip4").css("margin-left",700); //$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi"); });

 $("#human").mouseout(function(){
   $("#human").attr("src","BIT_human.png");
     });

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

 $("#inter").mouseover(function(){
   $("#inter").attr("src","BIT_inter2.png");

$("#tooltip5").css("margin-top",360); $("#tooltip5").css("margin-left",700); //$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi"); });

 $("#inter").mouseout(function(){
   $("#inter").attr("src","BIT_inter.png");
     });

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

 $("#model").mouseover(function(){
   $("#model").attr("src","BIT_model2.png");

$("#tooltip7").css("margin-top",480); $("#tooltip7").css("margin-left",450); //$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi"); });

 $("#model").mouseout(function(){
   $("#model").attr("src","BIT_model.png");
     });

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

 $("#device").mouseover(function(){
   $("#device").attr("src","BIT_Device.gif");

$("#tooltip3").css("margin-top",50); $("#tooltip3").css("margin-left",680); //$("#tip").html("to amplifier then and brought the amplifier into operation. Thus the amplifier would produce high massi"); });

 $("#device").mouseout(function(){
   $("#device").attr("src","BIT_device.png");
     });

});