我正在使用Inspinia主题。
如果您点击每个ibox右上角的fa-chevron
图标,它会折叠ibox。
我想使用全部折叠按钮折叠所有ibox。然后使用展开全部按钮展开它们。
按钮看起来像:
<button type="button" data-action="expand-all" class="btn btn-white btn-sm">Expand All</button>
<button type="button" data-action="collapse-all" class="btn btn-white btn-sm">Collapse All</button>
我想点击"Collapse All"
,然后点击所有最小化面板按钮。
如何?
答案 0 :(得分:3)
我不确定您使用的是哪个版本,但对于directives.js
中的AngularJS实现,您可以看到处理此问题的函数iboxTools
。如果您只是想使用jQuery手动执行它,它就像:
//slide up (or down) all ibox content
$('div.ibox-content').slideUp();
//change the chevron
$('.ibox-tools a.collapse-link i').toggleClass('fa-chevron-up').toggleClass('fa-chevron-down');