亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

jq插件問題,一開始第一個li顯示,之后鼠標移過之后,第一個li也跟著隱藏了

jq插件問題,一開始第一個li顯示,之后鼠標移過之后,第一個li也跟著隱藏了

sikey 2014-11-02 17:50:25
我想要的是,鼠標都離開之后第一個Li還是在顯示狀態<!DOCTYPE?html> <html> <head> ????<title>使用$.extend()擴展工具函數</title> ????<script?src="http://www.xianlaiwan.cn/data/jquery-1.8.2.min.js"?type="text/javascript"></script> ????<style> ????????li,ul{list-style:none;} ????????a{width:100%;float:left;} ????????.a?ul{?display:none} ????</style> </head> <body> ???<ul?id="a"> ??? ???<li?class="a"> ????<a?class="b"?href="1">1</a> ????<ul> ?????<li>11</li>???? ????</ul>??? ???</li> ??? ???<li?class="a"> ????<a?class="b"?href="2">2</a> ????<ul> ?????<li>22</li>???? ????</ul>??? ???</li> ??? ???</ul> ????<script?type="text/javascript"> ??????? ????????;?(function?($)?{ ????????????$.fn.extend({ ????????????????"change":?function?(col,cola)?{ ???????????????????var?$a=$("a").next(); ???????????????????$a.eq(0).show(); ???????????????????$(this).find("a").bind("mouseover",function(){ ???????????????????????$(this).css('background',col); ???????????????????????$(this).next().show(); ???????????????????}); ?????????????????????$(this).find("a").bind("mouseout",function(){ ???????????????????????$(this).css("background",cola); ???????????????????????$(this).next().hide(); ???????????????????}); ??????????????????? ????????????????} ????????????}); ????????})(jQuery); ????????$(function?()?{ ????????????$("#a").change("yellow","white"); ????????}); ????</script> </body> </html>
查看完整描述

目前暫無任何回答

  • 0 回答
  • 0 關注
  • 2748 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號