87,910
社区成员
发帖
与我相关
我的任务
分享
<a href="javascript:void(0)" id="EnPanel" class="languageEn">English</a>
/
<a href="javascript:void(0)" id="CnPanel" class="languageCn">中文</a>
<script type="text/javascript">
$(document).ready(function(){
//切换至英文
$("#EnPanel").click(function(){
$("#contentCNDiv").fadeOut("slow",function(){
$("#contentENDiv").fadeIn("slow",function(){
$("#title").html("My Resume");
})
});
alert("000")
/* css */
$("#EnPanel a").hover(
function(){
$(this).css("color","#D7D7D7");
},
function(){
$(this).css("color","#D7D7D7");
}
);
$("#CnPanel a").hover(
function(){
$(this).css("color","#6AB5FF");
},
function(){
$(this).css("color","#D7D7D7");
alert("111");
}
)
});
//切换至中文
$("#CnPanel").click(function(){
$("#contentENDiv").fadeOut("slow",function(){
$("#contentCNDiv").fadeIn("slow",function(){
$("#title").html("我的简历");
})
})
/* css */
$("#EnPanel a").hover(
function(){
$(this).css("color","#6AB5FF");
},
function(){
$(this).css("color","#D7D7D7");
}
);
$("#CnPanel a").hover(
function(){
$(this).css("color","#D7D7D7");
},
function(){
$(this).css("color","#D7D7D7");
alert("222");
}
)
})
})
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Resume</title>
<style type="text/css">
<!--
body {
background-image: url('./deepblue.jpg');
background-repeat: no-repeat;
background-attachment: fixed;
margin: 0px;
padding: 0px;
}
#LanguageDiv{
margin-top: 300px;
margin-left: 200px;
width: 720px;
color: #D7D7D7;
font-size: 12px;
text-align: right;
border-bottom: 1px solid #919191;
}
#contentENDiv {
margin-left: 200px;
padding-top: 0px;
width: 600px;
height: 1500px;
color: #EFAA65;
font-size: 22px;
line-height: 30px;
}
#contentCNDiv {
margin-left: 200px;
padding-top: 0px;
width: 600px;
height: 1500px;
color: #EFAA65;
font-size: 22px;
line-height: 30px;
display: none;
}
/* English */
a.languageEn:link{
color: #D7D7D7;
text-decoration: none;
}
a.languageEn:visited{
color: #D7D7D7;
text-decoration: none;
}
a.languageEn:hover{
color: #D7D7D7;
text-decoration: none;
}
a.languageEn:active{
color: #D7D7D7;
text-decoration: none;
}
/* 中文 */
a.languageCn:link{
color: #D7D7D7;
text-decoration: none;
}
a.languageCn:visited{
color: #D7D7D7;
text-decoration: none;
}
a.languageCn:hover{
color: #D7D7D7;
text-decoration: none;
}
a.languageCn:active{
color: #D7D7D7;
text-decoration: none;
}
-->
</style>
<script type="text/javascript" src="./jquery-1.5.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//切换至英文
$("#EnPanel").click(function(){
$("#contentCNDiv").fadeOut("slow",function(){
$("#contentENDiv").fadeIn("slow",function(){})
});
if($("#title").html() != "My Resume"){
$("#title").fadeOut("slow",function(){
$("#title").html("My Resume");
$("#title").fadeIn("slow",function(){})
})
}
/* css */
$("#EnPanel a").hover(
function(){
$(this).css("color","#D7D7D7");
},
function(){
$(this).css("color","#D7D7D7");
}
);
$("#CnPanel a").hover(
function(){
$(this).css("color","#6AB5FF");
},
function(){
$(this).css("color","#D7D7D7");
alert("111");
}
)
});
//切换至中文
$("#CnPanel").click(function(){
$("#contentENDiv").fadeOut("slow",function(){
$("#contentCNDiv").fadeIn("slow",function(){})
});
if($("#title").html() != "我的简历"){
$("#title").fadeOut("slow",function(){
$("#title").html("我的简历");
$("#title").fadeIn("slow",function(){})
})
}
/* css */
$("#EnPanel a").hover(
function(){
$(this).css("color","#6AB5FF");
},
function(){
$(this).css("color","#D7D7D7");
}
);
$("#CnPanel a").hover(
function(){
$(this).css("color","#D7D7D7");
},
function(){
$(this).css("color","#D7D7D7");
alert("222");
}
)
})
})
</script>
</head>
<body>
<div id="LanguageDiv">
<a href="javascript:void(0)" id="EnPanel" class="languageEn">English</a>
/
<a href="javascript:void(0)" id="CnPanel" class="languageCn">中文</a>
</div>
<!-- English -->
<div id="contentENDiv">
English English English
</div>
<!-- 中文 -->
<div id="contentCNDiv">
中文 中文 中文
</div>
</body>
</html>