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

Layui 導航默認展開和菜單欄選中高亮設置的方法

 更新時間:2019年09月04日 10:06:44   作者:黃寶康  
今天小編就為大家分享一篇Layui 導航默認展開和菜單欄選中高亮設置的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧

如下所示:

<ul class="layui-nav layui-nav-tree custom-nav-tree" lay-filter="kitNavbar" kit-navbar>

     <c:if test="${title_sys eq '內(nèi)容管理' }">
      <li class="layui-nav-item index1 layui-nav-itemed"><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" ><i class="fa fa-plug" aria-hidden="true"></i><span>宣傳教育</span></a>
       <dl class="layui-nav-child">
        <dd class="layui-this">
         <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" kit-target data-options="{url:'<%=path%>/content/jctt',icon:'&#xe658;',title:'基層頭條',id:'73'}"><i class="layui-icon" aria-hidden="true">&#xe658;</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" kit-target data-options="{url:'<%=path%>/content/dyxf',icon:'&#xe658;',title:'黨員先鋒',id:'74'}"><i class="layui-icon" aria-hidden="true">&#xe658;</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" kit-target data-options="{url:'<%=path%>/content/wdk',icon:'&#xe658;',title:'微黨課',id:'75'}"><i class="layui-icon" aria-hidden="true">&#xe658;</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" kit-target data-options="{url:'<%=path%>/content/remote_education',icon:'&#xe658;',title:'遠程教育',id:'76'}"><i class="layui-icon" aria-hidden="true"></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" kit-target data-options="{url:'<%=path%>/constant/ad',icon:'&#xe658;',title:'廣告輪播',id:'77'}"><i class="layui-icon" aria-hidden="true"></i><span>廣告輪播</span></a>
        </dd>

       </dl>
      </li>

      <li class="layui-nav-item index4"><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" ><i class="fa fa-plug" aria-hidden="true"></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" kit-target data-options="{url:'<%=path%>/content/mryx_type',icon:'&#xe658;',title:'學習類型管理',id:'200'}"><i class="layui-icon" aria-hidden="true"></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" kit-target data-options="{url:'<%=path%>/content/mryx',icon:'&#xe658;',title:'知識點管理',id:'201'}"><i class="layui-icon" aria-hidden="true"></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" kit-target data-options="{url:'<%=path%>/content/mryx_publish',icon:'&#xe658;',title:'發(fā)布記錄列表',id:'202'}"><i class="layui-icon" aria-hidden="true"></i><span>發(fā)布記錄列表</span></a>
        </dd>
       </dl>
      </li>
      <li class="layui-nav-item index5"><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" ><i class="fa fa-plug" aria-hidden="true"></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" kit-target data-options="{url:'<%=path%>/content/quest_type_index',icon:'&#xe658;',title:'題庫類型',id:'80'}"><i class="layui-icon" aria-hidden="true"></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" kit-target data-options="{url:'<%=path%>/content/quest_index',icon:'&#xe658;',title:'考題管理',id:'81'}"><i class="layui-icon" aria-hidden="true"></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" kit-target data-options="{url:'<%=path%>/content/quest_model_index',icon:'&#xe658;',title:'考卷模板',id:'82'}"><i class="layui-icon" aria-hidden="true"></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" kit-target data-options="{url:'<%=path %>/content/exam_index',icon:'&#xe658;',title:'考卷管理',id:'83'}"><i class="layui-icon" aria-hidden="true"></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" kit-target data-options="{url:'<%=path%>/content/record_index',icon:'&#xe658;',title:'考試記錄',id:'84'}"><i class="layui-icon" aria-hidden="true"></i><span>考試記錄</span></a>
        </dd>
       </dl></li>
     </c:if>
  </ul>

在第一個宣傳教育li中添加class為layui-nav-itemed,以及在第一個dd中添加class為layui-this。

效果展示如下:

本人也是通過查看點擊相應導航,在瀏覽器控制臺查看渲染后的class,得出此結(jié)果。

以上這篇Layui 導航默認展開和菜單欄選中高亮設置的方法就是小編分享給大家的全部內(nèi)容了,希望能給大家一個參考,也希望大家多多支持腳本之家。

相關文章

  • js插件YprogressBar實現(xiàn)漂亮的進度條效果

    js插件YprogressBar實現(xiàn)漂亮的進度條效果

    ProgressBar.js 是一個借助動態(tài) SVG 路徑的漂亮的,響應式的進度條效果。使用 ProgressBar.js 可以很容易地創(chuàng)建任意形狀的進度條。這個 JavaScript 庫提供線條,圓形和方形等幾個內(nèi)置的形狀,但你可使用 Illustrator 或任何其它的矢量圖形編輯器創(chuàng)建自己的進度條效果。
    2015-04-04
  • javascript document.referrer 用法

    javascript document.referrer 用法

    document對象的referrer屬性,返回導航到當前網(wǎng)頁的超鏈接所在網(wǎng)頁的URL。
    2009-04-04
  • 百度移動版的url編碼解碼示例

    百度移動版的url編碼解碼示例

    這篇文章主要介紹了百度移動版的url編碼解碼的具體實現(xiàn),需要的朋友可以參考下
    2014-04-04
  • JS中關于Class類的靜態(tài)屬性和靜態(tài)方法

    JS中關于Class類的靜態(tài)屬性和靜態(tài)方法

    這篇文章主要介紹了JS中關于Class類的靜態(tài)屬性和靜態(tài)方法,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-10-10
  • 如何開發(fā)出更好的JavaScript模塊

    如何開發(fā)出更好的JavaScript模塊

    給大家分享一下如何才能開發(fā)出更好的JavaScript模塊和功能,有興趣的朋友參考學習下吧。
    2017-12-12
  • JavaScript實現(xiàn)的簡單加密解密操作示例

    JavaScript實現(xiàn)的簡單加密解密操作示例

    這篇文章主要介紹了JavaScript實現(xiàn)的簡單加密解密操作,涉及javascript基于charCodeAt與fromCharCode的字符串編碼與解碼操作相關使用技巧,需要的朋友可以參考下
    2018-06-06
  • js實現(xiàn)滾動條自動滾動到最底部示例代碼

    js實現(xiàn)滾動條自動滾動到最底部示例代碼

    這篇文章主要給大家介紹了關于js實現(xiàn)滾動條自動滾動到最底部的相關資料,文中通過實例代碼介紹的非常詳細,對大家學習或者使用js具有一定的參考學習價值,需要的朋友可以參考下
    2023-06-06
  • javascript實現(xiàn)倒計時小案例

    javascript實現(xiàn)倒計時小案例

    這篇文章主要為大家詳細介紹了javascript實現(xiàn)倒計時小案例,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2022-07-07
  • javascript實現(xiàn)無法關閉的彈框

    javascript實現(xiàn)無法關閉的彈框

    本文分享了javascript實現(xiàn)無法關閉的彈框的實例代碼,感興趣的朋友可以看下
    2016-11-11
  • JS操作xml對象轉(zhuǎn)換為Json對象示例

    JS操作xml對象轉(zhuǎn)換為Json對象示例

    本篇文章主要介紹了JS操作xml對象轉(zhuǎn)換為Json對象示例,具有一定的參考價值,感興趣的小伙伴們可以參考一下。
    2017-03-03

最新評論