您的位置:首页 > 其它

二级导航

2015-06-02 02:08 288 查看
   $(document).bind("click",function(e){

    var target  = $(e.target);

    if(target.closest("li,p").length == 0){

      $("p").hide();    

    };

     e.stopPropagation();

   })*/

   

  var $_this = $(".aa").find("span");

  var $n =  $_this.next();

 

  $_this.click(function(event){

   var $ul_d = $n.css("display");       

   if($ul_d == "none"){

    $n.show();

   }else{

     $n.hide();

   }

   event.stopPropagation();
  })

<ul>

   <li class="aa">

    <span>一级导行</span>

    <ul>

     <li>二级导航</li>

     <li>二级导航</li>

    </ul>

   </li>

  </ul>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: