Team:SYSU-China/common.js
From 2013.igem.org
(8 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
/*Navigater start*/ | /*Navigater start*/ | ||
- | $(document).ready(function(){$("div.navigater").html('<UL> <LI class="column" id="HOME"><A href="https://2013.igem.org/Team:SYSU-China">Home</A> <LI class="column" id="PROJECT"><A href="https://2013.igem.org/Team:SYSU-China/Project">PROJECT</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Overview">Overview</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project?#h2_0">Background</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Design">Design</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Results">Results</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Future_work">Future work</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Modeling">Modeling</A></LI></UL></LI> <LI class="column" id="JUDGING" ><A href="">JUDGING</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Judging/Biobrick">Biobrick</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Judging/Achievements">Achievements</A></LI></UL></LI> <LI class="column" id="SAFETY"><A href="">SAFETY</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Safety">Safety</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Ethics">Ethics</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Safety/Human practice">Human practice</A></LI></UL></LI> <LI class="column" id="NOTEBOOK"><A href="">NOTEBOOK</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Notebookt/Methods">Methods</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Notebook/Labnotes">Labnotes</A></LI></UL></LI> <LI class="column" id="TEAM"><A href="">TEAM</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Team/Member">Member</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Team/Attribution">Attributions</A></LI> <LI><A | + | $(document).ready(function(){$("div.navigater").html('<UL> <LI class="column" id="HOME"><A href="https://2013.igem.org/Team:SYSU-China">Home</A> <LI class="column" id="PROJECT"><A href="https://2013.igem.org/Team:SYSU-China/Project">PROJECT</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Overview">Overview</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project?#h2_0">Background</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Design">Design</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Results">Results</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Future_work">Future work</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Project/Modeling">Modeling</A></LI></UL></LI> <LI class="column" id="JUDGING" ><A href="">JUDGING</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Judging/Biobrick">Biobrick</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Judging/Achievements">Achievements</A></LI></UL></LI> <LI class="column" id="SAFETY"><A href="">SAFETY</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Safety">Safety</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Safety/Ethics">Ethics</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Safety/Human practice">Human practice</A></LI></UL></LI> <LI class="column" id="NOTEBOOK"><A href="">NOTEBOOK</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Notebookt/Methods">Methods</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Notebook/Labnotes">Labnotes</A></LI></UL></LI> <LI class="column" id="TEAM"><A href="">TEAM</A> <UL> <LI><A href="https://2013.igem.org/Team:SYSU-China/Team/Member">Member</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Team/Attribution">Attributions</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Team/Gallery">Gallery</A></LI> <LI><A href="https://2013.igem.org/Team:SYSU-China/Team/Acknowledgements">Acknowledgment</A></LI></UL></LI></UL>')}); |
/*Navigater End*/ | /*Navigater End*/ | ||
Line 25: | Line 25: | ||
$(function(){ | $(function(){ | ||
+ | $("div#bodyContent").css({"background-image":"url(https://static.igem.org/mediawiki/2013/8/80/Logo-2013-SYSU-CHINA.png) 90% 1%;"}); | ||
$(".fig_img").click(function(){ | $(".fig_img").click(function(){ | ||
var _this = $(this); | var _this = $(this); | ||
Line 74: | Line 75: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
$("a.guide_button , a.guide_button2").mouseover(function(){ | $("a.guide_button , a.guide_button2").mouseover(function(){ | ||
- | + | $(this).animate({left:'+=15px'},10); | |
- | $(this).animate({left:'+= | + | $(this).animate({left:'-=15px'},10); |
- | $(this).animate({left:'-= | + | $(this).animate({top:'+=15px'},10); |
- | $(this).animate({top:'+= | + | $(this).animate({top:'-=15px'},10); |
- | $(this).animate({top:'-= | + | |
}); | }); | ||
}); | }); | ||
/* results guide end */ | /* results guide end */ |
Latest revision as of 03:29, 28 September 2013
/*Navigater start*/
$(document).ready(function(){$("div.navigater").html('- <A href="https://2013.igem.org/Team:SYSU-China">Home</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Project">PROJECT</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Project/Overview">Overview</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Project?#h2_0">Background</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Project/Design">Design</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Project/Results">Results</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Project/Future_work">Future work</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Project/Modeling">Modeling</A>
- <A href="">JUDGING</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Judging/Biobrick">Biobrick</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Judging/Achievements">Achievements</A>
- <A href="">SAFETY</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Safety">Safety</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Safety/Ethics">Ethics</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Safety/Human practice">Human practice</A>
- <A href="">NOTEBOOK</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Notebookt/Methods">Methods</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Notebook/Labnotes">Labnotes</A>
- <A href="">TEAM</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Team/Member">Member</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Team/Attribution">Attributions</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Team/Gallery">Gallery</A>
- <A href="https://2013.igem.org/Team:SYSU-China/Team/Acknowledgements">Acknowledgment</A>
/*Navigater End*/
/* Reference Anchor Start */
$(document).ready(function(){ anchor_quote = $(".quote"); anchor_name = 0; anchor_quote.each(function() { var refer_num = $(this).text(); anchor_name += 1; $(this).attr({"href":"#R"+anchor_name, "name":"Q"+anchor_name}); $(".references:contains("+refer_num+")").each(function(){ $(this).attr({"href":"#Q"+anchor_name, "name":"R"+anchor_name}) }); }); });
/* Reference Anchor End */
/* Figure function Start */
$(function(){
$("div#bodyContent").css({"background-image":"url() 90% 1%;"});
$(".fig_img").click(function(){ var _this = $(this); imgShow("#outerdiv", "#innerdiv", "#bigimg", _this); }); });
function imgShow(outerdiv, innerdiv, bigimg, _this){ var src = _this.attr("src");//get the src from fig_img $(bigimg).attr("src", src);//value to #bigimg
/*get the full size & show in the new layer*/ $("<img/>").attr("src", src).load(function(){ var windowW = $(window).width(); var windowH = $(window).height(); var realWidth = this.width; var realHeight = this.height; var imgWidth, imgHeight; var scale = 0.8;//zoom it if the img size larger than the window's
if(realHeight>windowH*scale) { imgHeight = windowH*scale; imgWidth = imgHeight/realHeight*realWidth; if(imgWidth>windowW*scale) { imgWidth = windowW*scale; } } else if(realWidth>windowW*scale) { imgWidth = windowW*scale;
imgHeight = imgWidth/realWidth*realHeight;
} else { imgWidth = realWidth; imgHeight = realHeight; }
$(bigimg).css("width",imgWidth);
var w = (windowW-imgWidth)/2; var h = (windowH-imgHeight)/2; $(innerdiv).css({"top":h, "left":w}); $(outerdiv).fadeIn("fast");//fade in speed for #outerdiv & fig_img });
$(outerdiv).click(function(){ $(this).fadeOut("fast"); }); }
/* Figure function End */ /* results guide start */ $(document).ready(function(){ $("a.guide_button , a.guide_button2").mouseover(function(){ $(this).animate({left:'+=15px'},10); $(this).animate({left:'-=15px'},10); $(this).animate({top:'+=15px'},10); $(this).animate({top:'-=15px'},10); }); }); /* results guide end */