You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
803 B
JavaScript
34 lines
803 B
JavaScript
$(document).ready( function () {
|
|
//initialize datatable
|
|
var oTable = $('#example').dataTable( {
|
|
"bPaginate": false,
|
|
"sDom" : "t" // just show table, no other controls
|
|
});
|
|
//initialize FixedHeader
|
|
// get header height if fixed
|
|
var offsetTop = 0;
|
|
if ($('.navbar-fixed-top').length>0)
|
|
offsetTop = $('.navbar-fixed-top').eq(0).innerHeight();
|
|
var oFH = new FixedHeader( oTable, {offsetTop: offsetTop} );
|
|
|
|
|
|
//redraw fixedHeaders as necessary
|
|
$(window).resize(function () {
|
|
redrawFixedTable();
|
|
});
|
|
|
|
function redrawFixedTable () {
|
|
oFH._fnUpdateClones(true);
|
|
oFH._fnUpdatePositions();
|
|
}
|
|
|
|
$( "#rightmenu-trigger, #leftmenu-trigger" ).click(function() {
|
|
setTimeout( function () {
|
|
redrawFixedTable();
|
|
setTimeout( function () {
|
|
$('body').scroll()
|
|
}, 500);
|
|
}, 50)
|
|
});
|
|
|
|
}); |