tree
来源:互联网 发布:sql 附加数据库 编辑:程序博客网 时间:2024/05/21 01:30
$(function () {
$('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
$('.tree li.parent_li > span').on('click', function (e) {
var children = $(this).parent('li.parent_li').find(' > ul > li');
if (children.is(":visible")) {
children.hide('fast');
$(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
} else {
children.show('fast');
$(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
}
e.stopPropagation();
});
});
$('.tree li:has(ul)').addClass('parent_li').find(' > span').attr('title', 'Collapse this branch');
$('.tree li.parent_li > span').on('click', function (e) {
var children = $(this).parent('li.parent_li').find(' > ul > li');
if (children.is(":visible")) {
children.hide('fast');
$(this).attr('title', 'Expand this branch').find(' > i').addClass('icon-plus-sign').removeClass('icon-minus-sign');
} else {
children.show('fast');
$(this).attr('title', 'Collapse this branch').find(' > i').addClass('icon-minus-sign').removeClass('icon-plus-sign');
}
e.stopPropagation();
});
});
0 0
- Tree
- tree
- tree
- TREE
- Tree
- Tree
- tree
- tree
- tree
- tree
- tree
- tree
- Tree
- Tree
- tree
- TREE
- tree
- tree
- 单片机的时钟分频
- 特征降维
- C++第一次上机实验报告—01
- 实际应用中经常用的代码片段,但是没有必要记住的
- 【leetcode】Array——Maximal Rectangle(85)
- tree
- AndroidStudio运行项目出现Failure [INSTALL_FAILED_DEXOPT]
- 用循环求
- 程序设计作业报告
- android日期选择器,从底部弹出的日期选择器,有点像IOS日期选择器
- BP算法的回归
- Android中实现推送方式的基础知识及相关解决方案
- Android内存泄漏分析大全
- 一个简单实用的ini解析算法