fastadmin 表头悬浮固定顶部
将下述代码放到模块控制器js中的index方法内:
$(function(){
var sourceTable = $("#table");//table id
var sourceTableHead = $("#table thead tr");//table thead tr id
var headHeight = sourceTableHead.height();//table thead tr height
//copy table and thead html tag from source table,
$('body').append('<div id="shelter" style="display:none;padding-left:30px;"><table id="fixed_table" border="0" cellpadding="4" cellspacing="0" class="table table-hover"><thead></thead></table></div>');
//only set top and left,beacuse i need the top bar can scroll left
$("#shelter").css({
'height':headHeight,'position':'fixed','top'