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样式的实例代码。编程之家 jb51.cc 收集整理的教程希望能对你有所帮助,如果觉得编程之家不错,可分享给好友!感谢支持。
原文链接:https://www.f2er.com/bootstrap/37697.html