YuhangYang (Talk | contribs) |
YuhangYang (Talk | contribs) |
||
Line 2: | Line 2: | ||
$(function(){ | $(function(){ | ||
− | $(".header .nav .mainnav").eq( | + | $(".header .nav .mainnav").eq(1).hover(function(){ |
$(".header .nav .Project span").css("color","#FAEE0D"); | $(".header .nav .Project span").css("color","#FAEE0D"); | ||
},function(){ | },function(){ |
Revision as of 12:34, 25 September 2017
/*custom Project Effect*/ $(function(){
$(".header .nav .mainnav").eq(1).hover(function(){ $(".header .nav .Project span").css("color","#FAEE0D"); },function(){ $(".header .nav .Project span").css("color","#FAEE0D"); });
});
/*Switch calendar*/ $(function(){
//March $(".March .icon_right").click(function(){
$(".March").removeClass("a-fadein"); $(".April").removeClass("a-fadeout"); $(".March").addClass("a-fadeout"); $(".April").addClass("a-fadein"); $(".April").css("display","block"); setTimeout(function(){ $(".March").css("display","none"); },1000);
});
$(".March .sth").click(function(){
$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".May .day_x:first li").css("color","#B6C211"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#009F6E","color":"white"});
var Month="March"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);
});
//April
$(".April .icon_left").click(function(){
$(".March").removeClass("a-fadeout"); $(".April").removeClass("a-fadein"); $(".April").addClass("a-fadeout"); $(".March").addClass("a-fadein"); $(".March").css("display","block"); setTimeout(function(){ $(".April").css("display","none"); },1000);
});
$(".April .icon_right").click(function(){
$(".May").removeClass("a-fadeout"); $(".April").removeClass("a-fadein"); $(".April").addClass("a-fadeout"); $(".May").addClass("a-fadein"); $(".May").css("display","block"); setTimeout(function(){ $(".April").css("display","none"); },1000);
});
$(".April .sth").click(function(){
$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".May .day_x:first li").css("color","#B6C211"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#83BC49","color":"white"});
var Month="April"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);
});
//May
$(".May .icon_left").click(function(){
$(".April").removeClass("a-fadeout"); $(".May").removeClass("a-fadein"); $(".May").addClass("a-fadeout"); $(".April").addClass("a-fadein"); $(".April").css("display","block"); setTimeout(function(){ $(".May").css("display","none"); },1000);
});
$(".May .icon_right").click(function(){
$(".June").removeClass("a-fadeout"); $(".May").removeClass("a-fadein"); $(".May").addClass("a-fadeout"); $(".June").addClass("a-fadein"); $(".June").css("display","block"); setTimeout(function(){ $(".May").css("display","none"); },1000);
});
$(".May .sth").click(function(){
$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".May .day_x:first li").css("color","#B6C211"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#C1D133","color":"white"});
var Month="May"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);
});
//June
$(".June .icon_left").click(function(){
$(".May").removeClass("a-fadeout"); $(".June").removeClass("a-fadein"); $(".June").addClass("a-fadeout"); $(".May").addClass("a-fadein"); $(".May").css("display","block"); setTimeout(function(){ $(".June").css("display","none"); },1000);
});
$(".June .icon_right").click(function(){
$(".July").removeClass("a-fadeout"); $(".June").removeClass("a-fadein"); $(".June").addClass("a-fadeout"); $(".July").addClass("a-fadein"); $(".July").css("display","block"); setTimeout(function(){ $(".June").css("display","none"); },1000);
});
$(".June .sth").click(function(){
$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".May .day_x:first li").css("color","#B6C211"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#FDC435","color":"white"});
var Month="June"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);
});
//July
$(".July .icon_left").click(function(){
$(".June").removeClass("a-fadeout"); $(".July").removeClass("a-fadein"); $(".July").addClass("a-fadeout"); $(".June").addClass("a-fadein"); $(".June").css("display","block"); setTimeout(function(){ $(".July").css("display","none"); },1000);
});
/*$(".July .icon_right").click(function(){
$(".July").removeClass("a-fadeout"); $(".Augest").removeClass("a-fadein"); $(".Augest").addClass("a-fadeout"); $(".July").addClass("a-fadein"); $(".July").css("display","block"); setTimeout(function(){ $(".July").css("display","none"); },1000);
});*/
$(".July .sth").click(function(){
$(".calendar .sth").css({"background":"none","color":"#333333"}); $(".June .day_x:first li").css("color","#B6C211"); $(".calendar .sth .focus").css("display","block"); $(this).children().css("display","none"); $(this).css({"background":"#EF8434","color":"white"});
var Month="July"; var Day="D"+String(parseInt($(this).text())); $(".Sth").html(Json[Month][Day]);
});
});