修改 bootstrap table 默认detailRow样式的实例代码
发布时间:2020-12-18 00:35:54 所属栏目:安全 来源:网络整理
导读:废话不多说了,直接给大家贴代码,具体代码如下所示: tr[data-index] > td > .detail-icon').off('click').on('click',function () { var $this = $(this),//a.detail-icon $tr = $this.parent().parent(),//current row index = $tr.data('index'),row = d
废话不多说了,直接给大家贴代码,具体代码如下所示: tr[data-index] > td > .detail-icon').off('click').on('click',function () {
var $this = $(this),//a.detail-icon
$tr = $this.parent().parent(),//current row
index = $tr.data('index'),row = data[index]; // Fix #980 Detail view,when searching,returns wrong row
// remove and update
if ($tr.next().is('tr.detail-view')) { //exsit
$this.find('i').attr('class',sprintf('%s %s',that.options.iconsPrefix,that.options.icons.detailOpen));
that.trigger('collapse-row',index,row);
$tr.next().remove();
$tr.next().remove();
} else { //not exsit and add
$this.find('i').attr('class',that.options.icons.detailClose));
//$tr.after(sprintf(' 以上所述是小编给大家介绍的修改 bootstrap table 默认detailRow样式的实例代码。编程之家 52php.cn 收集整理的教程希望能对你有所帮助,如果觉得编程之家不错,可分享给好友!感谢支持。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- angularjs – Karma’Unexpected Request’当测试
- shell – 如何在Jenkins控制台输出中隐藏密码?
- 在Scala中,是否可以“定义”def的类型参数?
- scala – 如何在Akka-http 2.4.1中包含applicati
- 从sbt中调用我的测试时排除ScalaTest测试
- 如何在多个组件之间使用Angular 2的FormBuilder
- Bootstrap3 模态框使用实例
- 2、Angular JS 学习笔记 - 双向数据绑定和Scope概
- angularjs – 在Angular 2中更改Route Change上的
- angularjs – Bootstrap 3:使用角度js取消选择制
热点阅读