<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>hover()方法切换事件</title>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h3>hover()方法切换事件</h3>
<div id="123">别走!你就是土豪</div>
<div id="aaa">点击</div>
<p style="display:none" id="fk" >666</p>
<script type="text/javascript">
$(function ()
{
x=$("a");
for(i=0;i<x.length;i++)
{
$("a")[i].bind("click",function()
{
$("p").css({"display":"block"});
})
$("a")[i].hover
(
function () {
$(this).addClass("orange");
},
function () {
$(this).removeClass("orange");
}
)
}
)
};
</script>
</body>
</html>闹小志
慕娘9282524
weibo_哆啦A梦有大口袋_0
一杯2块的奶茶
相关分类