下面我就為大家分享一篇jquery easyui 折疊面板accordion的使用實(shí)例,具有很好的參考價值,希望對大家有所幫助。
1、對折疊面板區(qū)域 p 設(shè)置 class=”easyui-accordion”
2、在區(qū)域添加多個 p, 每個 p 就是一個面板 (每個面板一定要設(shè)置 title 屬性)。
3、設(shè)置面板屬性 fit 為 true,自適應(yīng)父容器大小
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>easyui-折疊面板accordion的使用</title> <!-- 導(dǎo)入jquery核心類庫 --> <script type="text/javascript" src="../js/jquery-1.8.3.js"></script> <!-- 導(dǎo)入easyui類庫 --> <link id="easyuiTheme" rel="stylesheet" type="text/css" href="../js/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="../js/easyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="../css/default.css"> <script type="text/javascript" src="../js/easyui/jquery.easyui.min.js"></script> </head> <body class="easyui-layout"> <p data-options="region:'north',title:'你我他學(xué)習(xí)吧-學(xué)習(xí)Java的好博客!'" style="height:100px"></p> <p data-options="region:'west',title:'菜單導(dǎo)航'" style="width:200px"> <!--折疊面板--> <p class="easyui-accordion" data-options="fit:true"> <p data-options="title:'基礎(chǔ)菜單'">面板一</p> <p data-options="title:'系統(tǒng)菜單'">面板二</p> </p> </p> <p data-options="region:'center',title:'中部區(qū)域'"></p> <p data-options="region:'east',title:'東部區(qū)域'" style="width:100px"></p> <p data-options="region:'south',title:'南部區(qū)域'" style="height:100px"></p> </body> </html>
上面是我整理給大家的,希望今后會對大家有幫助。
相關(guān)文章:
在jQuery中如何實(shí)現(xiàn)定時隱藏對話框
在JS/jQuery中如何實(shí)現(xiàn)DIV延時幾秒后消失或顯示
使用原生js實(shí)現(xiàn)省市區(qū)三級聯(lián)動
以上就是在EasyUI中如何使用accordion的詳細(xì)內(nèi)容,更多請關(guān)注php中文網(wǎng)其它相關(guān)文章!
每個人都需要一臺速度更快、更穩(wěn)定的 PC。隨著時間的推移,垃圾文件、舊注冊表數(shù)據(jù)和不必要的后臺進(jìn)程會占用資源并降低性能。幸運(yùn)的是,許多工具可以讓 Windows 保持平穩(wěn)運(yùn)行。
微信掃碼
關(guān)注PHP中文網(wǎng)服務(wù)號
QQ掃碼
加入技術(shù)交流群
Copyright 2014-2025 http://m.miracleart.cn/ All Rights Reserved | php.cn | 湘ICP備2023035733號