关于用hover()
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://www.imooc.com/data/jquery-1.8.2.min.js"></script>
</head>
<body>
<div id="content">
<ul>
<li>语文</li>
<li>数学</li>
<li>英语</li>
<li>物理</li>
<li>化学</li>
<li>生物</li>
</ul>
</div>
<script type="text/javascript">
(function($){
$.extend({
"liFocus":function(myli){
myli.css("background-color","#ccc");
},
"liBlur":function(myli){
myli.css("background-color","#fff");
}
});
})(jQuery);
$(function(){
$("li").hover(
$.liFocus($(this)),
$.liBlur($(this))
)
});
</script>
</body>
</html>
为什么实现不了这效果