欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

修改layui的后臺(tái)模板的左側(cè)導(dǎo)航欄可以伸縮的方法

 更新時(shí)間:2019年09月10日 16:12:10   作者:小龍魂  
今天小編就為大家分享一篇修改layui的后臺(tái)模板的左側(cè)導(dǎo)航欄可以伸縮的方法,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過(guò)來(lái)看看吧

原生的左側(cè)導(dǎo)航欄代碼:

<div class="layui-side layui-bg-black">
  <div class="layui-side-scroll">
   <!-- 左側(cè)導(dǎo)航區(qū)域(可配合layui已有的垂直導(dǎo)航) -->
   <ul class="layui-nav layui-nav-tree" lay-filter="test">
    <li class="layui-nav-item layui-nav-itemed">
     <a class="" href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >所有商品</a>
     <dl class="layui-nav-child">
      <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >列表一</a></dd>
      <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >列表二</a></dd>
      <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >列表三</a></dd>
      <dd><a href="">超鏈接</a></dd>
     </dl>
    </li>
    <li class="layui-nav-item">
     <a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >解決方案</a>
     <dl class="layui-nav-child">
      <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >列表一</a></dd>
      <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" >列表二</a></dd>
      <dd><a href="">超鏈接</a></dd>
     </dl>
    </li>
    <li class="layui-nav-item"><a href="">云市場(chǎng)</a></li>
    <li class="layui-nav-item"><a href="">發(fā)布商品</a></li>
   </ul>
  </div>
 </div>


自己修改的:

<div class="layui-side layui-bg-black">
  <div class="layui-side-scroll">
    <div title="菜單縮放" class="kit-side-fold"><i class="fa fa-navicon" aria-hidden="true"></i></div>
    <!-- 左側(cè)導(dǎo)航區(qū)域(可配合layui已有的垂直導(dǎo)航) -->
    <ul class="layui-nav layui-nav-tree" lay-filter="test">
      <li class="layui-nav-item layui-nav-itemed">
        <a class="" href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-user-circle-o fa-lg"></i> <span >生源追蹤</span></a>
        <dl class="layui-nav-child">
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-list fa-lg"></i> <span >生源列表</span></a></dd>
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-clipboard fa-lg"></i> <span >學(xué)校信息</span></a></dd>
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-file-text fa-lg"></i> <span >工做計(jì)劃</span></a></dd>
        </dl>
      </li>
      <li class="layui-nav-item">
        <a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-vcard fa-lg"></i> <span >學(xué)員管理</span></a>
        <dl class="layui-nav-child">
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-th-list fa-lg"></i> <span >學(xué)員列表</span></a></dd>
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-user-o fa-lg"></i> <span >考勤管理</span></a></dd>
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-send-o fa-lg"></i> <span >溝通計(jì)劃</span></a></dd>
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-frown-o fa-lg"></i> <span >成績(jī)管理</span></a></dd>
        </dl>
      </li>
      <li class="layui-nav-item">
        <a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-diamond fa-lg"></i> <span >管理設(shè)置</span></a>
        <dl class="layui-nav-child">
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-address-book fa-lg"></i> <span >賬號(hào)管理</span></a></dd>
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-check-square fa-lg"></i> <span >授權(quán)管理</span></a></dd>
        </dl>
      </li>
      <li class="layui-nav-item">
        <a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-gear fa-lg"></i> <span >系統(tǒng)管理</span></a>
        <dl class="layui-nav-child">
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-window-restore fa-lg"></i> <span >系統(tǒng)信息</span></a></dd>
          <dd><a href="javascript:;" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" rel="external nofollow" ><i class="fa fa-database fa-lg"></i> <span >操作日志</span></a></dd>
        </dl>
      </li>
    </ul>
  </div>
</div>

JQ代碼:

<script>
  //JavaScript代碼區(qū)域
  layui.use('element', function(){
    var element = layui.element;

  });
  var isShow = true; //定義一個(gè)標(biāo)志位
  $('.kit-side-fold').click(function(){
    //選擇出所有的span,并判斷是不是hidden
    $('.layui-nav-item span').each(function(){
      if($(this).is(':hidden')){
        $(this).show();
      }else{
        $(this).hide();
      }
    });
    //判斷isshow的狀態(tài)
    if(isShow){
      $('.layui-side.layui-bg-black').width(60); //設(shè)置寬度
      $('.kit-side-fold i').css('margin-right', '70%'); //修改圖標(biāo)的位置
      //將footer和body的寬度修改
      $('.layui-body').css('left', 60+'px');
      $('.layui-footer').css('left', 60+'px');
      //將二級(jí)導(dǎo)航欄隱藏
      $('dd span').each(function(){
        $(this).hide();
      });
      //修改標(biāo)志位
      isShow =false;
    }else{
      $('.layui-side.layui-bg-black').width(200);
      $('.kit-side-fold i').css('margin-right', '10%');
      $('.layui-body').css('left', 200+'px');
      $('.layui-footer').css('left', 200+'px');
      $('dd span').each(function(){
        $(this).show();
      });
      isShow =true;
    }
  });

</script>

以上這篇修改layui的后臺(tái)模板的左側(cè)導(dǎo)航欄可以伸縮的方法就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

  • JS 獲取HTML標(biāo)簽內(nèi)的子節(jié)點(diǎn)的方法

    JS 獲取HTML標(biāo)簽內(nèi)的子節(jié)點(diǎn)的方法

    下面小編就為大家?guī)?lái)一篇JS 獲取HTML標(biāo)簽內(nèi)的子節(jié)點(diǎn)的方法。小編覺(jué)得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2016-09-09
  • 前端實(shí)現(xiàn)讀取word文件并將其原樣式展示的幾種方案

    前端實(shí)現(xiàn)讀取word文件并將其原樣式展示的幾種方案

    在前端直接讀取并原樣展示W(wǎng)ord文檔是一個(gè)相對(duì)復(fù)雜的任務(wù),因?yàn)閃ord文檔的格式(如.doc或.docx)與Web技術(shù)棧使用的格式(HTML、CSS)不兼容,這篇文章主要給大家介紹了關(guān)于前端實(shí)現(xiàn)讀取word文件并將其原樣式展示的幾種方案,需要的朋友可以參考下
    2024-08-08
  • JavaScript獲取table中某一列的值的方法

    JavaScript獲取table中某一列的值的方法

    這篇文章主要介紹了JavaScript獲取table中某一列的值的方法,需要的朋友可以參考下
    2014-05-05
  • 正則表達(dá)式基本語(yǔ)法及表單驗(yàn)證操作詳解【基于JS】

    正則表達(dá)式基本語(yǔ)法及表單驗(yàn)證操作詳解【基于JS】

    這篇文章主要介紹了正則表達(dá)式基本語(yǔ)法及表單驗(yàn)證操作,較為詳細(xì)的分析了正則表達(dá)式的基本語(yǔ)法以及基于JS實(shí)現(xiàn)的表單正則驗(yàn)證操作相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下
    2017-04-04
  • 還不懂遞歸?讀完這篇文章保證你會(huì)懂

    還不懂遞歸?讀完這篇文章保證你會(huì)懂

    你還不懂遞歸?讀完這篇文章保證你會(huì)懂,下面這篇文章主要給大家介紹了關(guān)于遞歸的相關(guān)內(nèi)容,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2018-07-07
  • JS中產(chǎn)生標(biāo)識(shí)符方式的演變

    JS中產(chǎn)生標(biāo)識(shí)符方式的演變

    本文記錄下JS中產(chǎn)生標(biāo)識(shí)符方式的演變,從ES5到ES6,ES5及其之前是一種方式,只包含兩種聲明(var/function),ES6則增加了一些產(chǎn)生標(biāo)識(shí)符的關(guān)鍵字,如 let、const、class。
    2015-06-06
  • EditPlus中的正則表達(dá)式 實(shí)戰(zhàn)(4)

    EditPlus中的正則表達(dá)式 實(shí)戰(zhàn)(4)

    這篇文章主要介紹了 EditPlus中的正則表達(dá)式 實(shí)戰(zhàn)(4)的相關(guān)資料,需要的朋友可以參考下
    2016-12-12
  • 使用js和canvas實(shí)現(xiàn)時(shí)鐘效果

    使用js和canvas實(shí)現(xiàn)時(shí)鐘效果

    這篇文章主要為大家詳細(xì)介紹了使用js和canvas實(shí)現(xiàn)時(shí)鐘效果,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2020-09-09
  • 詳解JavaScript的懶加載是如何實(shí)現(xiàn)的

    詳解JavaScript的懶加載是如何實(shí)現(xiàn)的

    懶加載(Lazy Loading)是一種在軟件開(kāi)發(fā)中常用的優(yōu)化技術(shù),它主要用于延遲加載資源,直到真正需要使用的時(shí)候才進(jìn)行加載,這樣可以減少初始加載的時(shí)間和資源消耗,并提升用戶(hù)體驗(yàn),本文給大家詳細(xì)介紹了JavaScript的懶加載是如何實(shí)現(xiàn)的,需要的朋友可以參考下
    2024-01-01
  • 非常酷的js圖形漸隱導(dǎo)航菜單欄

    非??岬膉s圖形漸隱導(dǎo)航菜單欄

    非常酷的js圖形漸隱導(dǎo)航菜單欄...
    2007-08-08

最新評(píng)論