Team:UESTC-China
From 2014.igem.org
(Difference between revisions)
Line 324: | Line 324: | ||
<script > | <script > | ||
- | + | $(document).ready(function(){ | |
- | + | var imageload=new Array("http://fudanigem.phx-2.ifreeurl.com/img/big1.jpg","http://fudanigem.phx-2.ifreeurl.com/img/big2.jpg","http://fudanigem.phx-2.ifreeurl.com/img/big3.jpg"); | |
- | + | var datatemp=function(){ | |
- | + | this.head; | |
- | + | this.content; | |
- | + | } | |
- | + | var data1=new datatemp(); | |
- | + | var data2=new datatemp(); | |
- | + | var data3=new datatemp(); | |
- | + | data1.head="Our Team"; | |
- | + | data1.content="Conducted by two kind teachers, Fudan iGem 2013 team is full of students who are energetic with the scientific works. This summer, they have spent an unforgetable period of time together."; | |
- | + | data2.head="Environment Transformer "; | |
- | + | data2.content="Environment Transformer enables manageable programming working range"; | |
- | + | data3.head="Triphase"; | |
- | + | data3.content="The first engineered triphase riboswitch practices a new principle of riboswitch design."; | |
- | + | var imageintro=new Array(data1,data2,data3); | |
- | + | var imagecount=0; | |
- | + | var init=function(){ | |
- | + | $('.arrow').hide(); | |
- | + | $('.top-menu-sub').hide(); | |
+ | } | ||
+ | var bind=function(){ | ||
+ | $("#top").hide(); | ||
+ | $(document).scroll(function(){ | ||
+ | if($(document).scrollTop()>308){ | ||
+ | $("#left-bar").css("position","fixed"); | ||
+ | $("#left-bar").css("top","0%"); | ||
} | } | ||
- | + | else{ | |
- | + | console.log(1); | |
- | + | $("#left-bar").css("position","absolute"); | |
- | + | $("#left-bar").css("top",""); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | }; | |
- | + | }) | |
- | + | $('.top-menu-each').hover(function(){ | |
- | + | $('.top-menu-each.click .arrow').hide(); | |
- | + | $('.top-menu-each.click').removeClass('click'); | |
- | + | $(this).addClass('click'); | |
- | + | $(this).find('.arrow').show(); | |
- | + | $('.top-menu-sub.show').hide(); | |
- | + | $('.top-menu-sub.show').removeClass('show'); | |
- | + | $(this).find('.top-menu-sub').addClass('show'); | |
- | + | $(this).find('.top-menu-sub').show();} | |
- | + | , | |
- | + | function() { | |
- | + | $(this).removeClass('click'); | |
- | + | $(this).find('.arrow').hide(); | |
- | + | $(this).find('.top-menu-sub').removeClass('show'); | |
- | + | $(this).find('.top-menu-sub').hide(); | |
- | + | ||
- | + | }) | |
- | + | } | |
- | + | var changepic=function(){ | |
- | + | imagecount=imagecount+1; | |
- | + | if(imagecount==imageload.length){ | |
- | + | imagecount=imagecount-imageload.length; | |
- | + | } | |
- | + | $('#big-photo-hover').fadeOut(function(){ | |
- | + | $('#big-photo-wrap').prepend('<img src='+imageload[imagecount]+'>'); | |
- | + | $('#big-photo img:eq(0)').css('margin-left','-1214px'); | |
- | + | $('#big-photo img:eq(0)').animate({marginLeft:'0px'},3000); | |
- | + | $('#big-photo img:eq(1)').animate({marginLeft:'1214px'},3000,function(){ | |
- | + | $('#big-photo img:eq(1)').remove(); | |
- | + | $('#big-photo-hover .header').html(imageintro[imagecount].head); | |
- | + | $('#big-photo-hover .content').html(imageintro[imagecount].content); | |
- | + | $('#big-photo-hover').fadeIn(); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
}); | }); | ||
- | + | }) | |
- | + | ||
- | $('#top').click(function(){ | + | |
- | + | } | |
- | + | $(window).scroll(function(){ | |
- | + | min_height=window.screen.availHeight ; | |
- | + | var s = $(window).scrollTop(); | |
- | + | if( s > 0){ | |
- | + | if(!$("#top").hasClass("hide")) | |
- | + | $('#top').fadeIn(100); | |
- | + | }else{ | |
- | + | $('#top').fadeOut(200); | |
- | + | }; | |
+ | }); | ||
+ | |||
+ | |||
+ | $('#top').click(function(){ | ||
+ | $('html,body').animate({scrollTop:0},300); | ||
+ | |||
+ | }); | ||
+ | setInterval(changepic,8000); | ||
+ | init(); | ||
+ | bind(); | ||
+ | if ($("p:contains('Team')").parent().next().find("p").html() == "Result") { | ||
+ | $("p:contains('Result')").parent().remove(); | ||
+ | }; | ||
+ | if ($("p:contains('Modeling')").parent().next().find("p").html() != "Result") { | ||
a = $("p:contains('Home')").parent().parent().clone(); | a = $("p:contains('Home')").parent().parent().clone(); | ||
a.find('p').html('Result'); | a.find('p').html('Result'); | ||
Line 442: | Line 442: | ||
}) | }) | ||
+ | |||
Revision as of 07:20, 18 June 2014
Our Team
Conducted by two kind teachers, Fudan iGem 2013 team is full of students who are energetic with the scientific works. This summer, they have spent an unforgetable period of time together.