{
$('li:lt(2)',
an[i]).removeClass('disabled');
}
if
( oPaging.iPage === oPaging.iTotalPages-1 || oPaging.iTotalPages === 0 ) {
$('.next',
an[i]).addClass('disabled');
$('li:last',
an[i]).addClass('disabled');
}
else
{
$('.next',
an[i]).removeClass('disabled');
$('li:last',
an[i]).removeClass('disabled');
}
}
}
}
}
);
/*
*
TableTools Bootstrap compatibility
*
Required TableTools 2.1+
*/
if
( $.fn.DataTable.TableTools ) {
//
Set the classes that TableTools uses to something suitable for Bootstrap
$.extend(
true,
$.fn.DataTable.TableTools.classes, {
"container":
"DTTT
btn-group",
"buttons":
{
"normal":
"btn",
"disabled":
"disabled"
},
"collection":
{
"container":
"DTTT_dropdown
dropdown-menu",
"buttons":
{
"normal":
"",
"disabled":
"disabled"
}
},
"print":
{
"info":
"DTTT_print_info
modal"
},
"select":
{
"row":
"active"
}
}
);
//
Have the collection use a bootstrap compatible dropdown
$.extend(
true,
$.fn.DataTable.TableTools.DEFAULTS.oTags, {
"collection":
{
"container":
"ul",
"button":
"li",
"liner":
"a"
}
}
);
}
好了,下面看下jQuery datatable中加入双击跳转功能
$('#topicDg tbody').on('dblclick','tr',function(){
var self=$(this);
var id=self.find('.td-id').text();
var name=self.find('.td-name').text();
creatIframe("/post/postList.do?id="+id+"&name="+name,"帖子管理");
}); ps:点击话题列表中的一行,跳转到帖子列表中。










