Team:Peking R/test
From 2011.igem.org
(Difference between revisions)
Grasscliff (Talk | contribs) |
Grasscliff (Talk | contribs) |
||
Line 90: | Line 90: | ||
z-index:5; | z-index:5; | ||
background-image: url(../../mainpage%20logo/PekingR%20acknowledgement3.1.png); | background-image: url(../../mainpage%20logo/PekingR%20acknowledgement3.1.png); | ||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
- | |||
} | } | ||
</style> | </style> | ||
Line 104: | Line 96: | ||
<body> | <body> | ||
- | |||
<table width="968" border="0" cellspacing="0" cellpadding="0"> | <table width="968" border="0" cellspacing="0" cellpadding="0"> | ||
<tr> | <tr> | ||
Line 119: | Line 110: | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
- | <td colspan="7" bgcolor="#EEEDED"><div id="flash"> | + | <td colspan="7" bgcolor="#EEEDED"> |
+ | |||
+ | |||
+ | |||
+ | <div id="flash"> | ||
<div id="flashBg"> | <div id="flashBg"> | ||
<div id="flashLine"> | <div id="flashLine"> | ||
Line 242: | Line 237: | ||
- | </div> | + | </div> |
- | + | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | </td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 257: | Line 257: | ||
+ | <div id="flash"> | ||
+ | <div id="flashBg"> | ||
+ | <div id="flashLine"> | ||
+ | <div id="flash"><a href="http://www.lingyou.net" target="_blank" style="display:block; " > | ||
+ | </a> | ||
+ | <a href="#" target="_blank" id="flash2" style="display:none; " > | ||
+ | <img src="images/flash.gif" width="968px" height="381px" /> | ||
+ | </a> | ||
+ | <a href="#" target="_blank" id="flash3" style="display:none; " > | ||
+ | <img src="images/flash.gif" width="968px" height="381px" /> | ||
+ | </a> | ||
+ | <a href="http://www.lingyou.net/" target="_blank" id="flash4" style="display:none; " > | ||
+ | <img src="file/20110623100121.jpg" width="968px" height="381px" /> | ||
+ | </a> | ||
+ | <div class="flash_bar"> | ||
+ | <div class="dq" id="f1" onclick="changeflash(1)"></div> | ||
+ | <div class="no" id="f2" onclick="changeflash(2)"></div> | ||
+ | <div class="no" id="f3" onclick="changeflash(3)"></div> | ||
+ | <div class="no" id="f4" onclick="changeflash(4)"></div> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | <script type="text/javascript"> | ||
+ | $(document).ready(function(){ | ||
+ | $(".item1").hover(function(){$("#tit_fc1").slideDown("normal"); }, function() {$("#tit_fc1").slideUp("fast");}); | ||
+ | $(".item2").hover(function(){$("#tit_fc2").slideDown("normal"); }, function() {$("#tit_fc2").slideUp("fast");}); | ||
+ | $(".item3").hover(function(){$("#tit_fc3").slideDown("normal"); }, function() {$("#tit_fc3").slideUp("fast");}); | ||
+ | $(".item4").hover(function(){$("#tit_fc4").slideDown("normal"); }, function() {$("#tit_fc4").slideUp("fast");}); | ||
+ | }); | ||
+ | |||
+ | var currentindex=1; | ||
+ | $("#flashBg").css("background-color",$("#flash1").attr("name")); | ||
+ | function changeflash(i) { | ||
+ | currentindex=i; | ||
+ | for (j=1;j <= 4;j++){ | ||
+ | if (j==i) | ||
+ | {$("#flash"+j).fadeIn("normal"); | ||
+ | $("#flash"+j).css("display","block"); | ||
+ | $("#f"+j).removeClass(); | ||
+ | $("#f"+j).addClass("dq"); | ||
+ | $("#flashBg").css("background-color",$("#flash"+j).attr("name")); | ||
+ | } | ||
+ | else | ||
+ | {$("#flash"+j).css("display","none"); | ||
+ | $("#f"+j).removeClass(); | ||
+ | $("#f"+j).addClass("no");} | ||
+ | }} | ||
+ | function startAm(){ | ||
+ | timerID = setInterval("timer_tick()",5000); | ||
+ | } | ||
+ | function stopAm(){ | ||
+ | clearInterval(timerID); | ||
+ | } | ||
+ | function timer_tick() { | ||
+ | currentindex=currentindex >= 4 ? 1 : currentindex + 1; | ||
+ | changeflash(currentindex);} | ||
+ | $(document).ready(function(){ | ||
+ | $(".flash_bar div").mouseover(function(){stopAm();}).mouseout(function(){startAm();}); | ||
+ | startAm(); | ||
+ | }); | ||
+ | |||
+ | function ChangeImg(i){ | ||
+ | $("#img"+i).removeAttr("src"); | ||
+ | $("#img"+i).attr("src","/skin/tg2011/images/clients_"+i+"a.gif"); | ||
+ | } | ||
+ | function ResetImg(i){ | ||
+ | $("#img"+i).removeAttr("src"); | ||
+ | $("#img"+i).attr("src","/skin/tg2011/images/clients_"+i+".gif"); | ||
+ | } | ||
+ | //----Popfc | ||
+ | |||
+ | function ClosePop(i){ | ||
+ | $("#Pop"+i).fadeOut("normal")} | ||
+ | |||
+ | $(function() { | ||
+ | $("div[name='divClick']").click(function() { | ||
+ | if ($(this).attr('class')=='item1') | ||
+ | { | ||
+ | var showDiv = $("#Pop1"); //得到层对象 | ||
+ | } | ||
+ | if ($(this).attr('class')=='item2') | ||
+ | { | ||
+ | var showDiv = $("#Pop2"); //得到层对象 | ||
+ | } | ||
+ | if ($(this).attr('class')=='item3') | ||
+ | { | ||
+ | var showDiv = $("#Pop3"); //得到层对象 | ||
+ | } | ||
+ | if ($(this).attr('class')=='item4') | ||
+ | { | ||
+ | var showDiv = $("#Pop4"); //得到层对象 | ||
+ | } | ||
+ | |||
+ | var divName = showDiv.attr('name'); //得到这个层的name | ||
+ | if (showDiv.is(":hidden")) { //判断层是否隐藏 | ||
+ | $("div[name='" + divName + "']").hide("normal"); | ||
+ | showDiv.fadeIn("normal"); //true:显示 | ||
+ | $('body').one('click', function() { //给BODY绑定一次性点击事件 | ||
+ | showDiv.fadeOut("normal"); //点击BODY显示层 | ||
+ | }); | ||
+ | return false; //返回 | ||
+ | } | ||
+ | else { | ||
+ | |||
+ | showDiv.hide(); //false:显示层 | ||
+ | $('body').one('click', function() { //给BODY绑定一次性点击事件 | ||
+ | showDiv.fadeOut("normal"); //点击BODY显示层 | ||
+ | }); | ||
+ | return false; //返回 | ||
+ | } | ||
+ | }); | ||
+ | |||
+ | $("div[name='PopBox']").click(function() { //点击显示部分不隐藏 | ||
+ | return false; | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | </script> | ||
+ | |||
+ | </div> | ||
Latest revision as of 00:09, 5 October 2011
Template:Https://2011.igem.org/Team:Peking R/bannerhidden Template:Https://2011.igem.org/Team:Peking R/back2