Team:BIT/index.js
From 2014.igem.org
Line 35: | Line 35: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
$("#project").mouseover(function(){ | $("#project").mouseover(function(){ | ||
- | $("#project").attr("src","https://static.igem.org/mediawiki/2014/ | + | $("#project").attr("src","https://static.igem.org/mediawiki/2014/e/e0/BIT_Project.gif"); |
}); | }); | ||
$("#project").mouseout(function(){ | $("#project").mouseout(function(){ | ||
Line 59: | Line 59: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
$("#human").mouseover(function(){ | $("#human").mouseover(function(){ | ||
- | $("#human").attr("src","https://static.igem.org/mediawiki/2014/ | + | $("#human").attr("src","https://static.igem.org/mediawiki/2014/f/fb/BIT_Human.gif"); |
}); | }); | ||
$("#human").mouseout(function(){ | $("#human").mouseout(function(){ | ||
Line 83: | Line 83: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
$("#device").mouseover(function(){ | $("#device").mouseover(function(){ | ||
- | $("#device").attr("src","https://static.igem.org/mediawiki/2014/ | + | $("#device").attr("src","https://static.igem.org/mediawiki/2014/9/9d/BIT_Device.gif"); |
}); | }); | ||
$("#device").mouseout(function(){ | $("#device").mouseout(function(){ |
Revision as of 23:45, 14 August 2014
// 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%', }) });*/
});
/*图片变色*/
$(document).ready(function(){
$("#project").mouseover(function(){ $("#project").attr("src","");
});
$("#project").mouseout(function(){ $("#project").attr("src",""); });
}); $(document).ready(function(){
$("#team").mouseover(function(){ $("#team").attr("src","");
});
$("#team").mouseout(function(){ $("#team").attr("src",""); });
}); $(document).ready(function(){
$("#notebook").mouseover(function(){ $("#notebook").attr("src","");
});
$("#notebook").mouseout(function(){ $("#notebook").attr("src",""); });
}); $(document).ready(function(){
$("#human").mouseover(function(){ $("#human").attr("src","");
});
$("#human").mouseout(function(){ $("#human").attr("src",""); });
}); $(document).ready(function(){
$("#inter").mouseover(function(){ $("#inter").attr("src","");
});
$("#inter").mouseout(function(){ $("#inter").attr("src",""); });
}); $(document).ready(function(){
$("#model").mouseover(function(){ $("#model").attr("src","");
});
$("#model").mouseout(function(){ $("#model").attr("src",""); });
}); $(document).ready(function(){
$("#device").mouseover(function(){ $("#device").attr("src","");
});
$("#device").mouseout(function(){ $("#device").attr("src",""); });
});
/*横向导航*/
$(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")
})
})