我正在使用Stupid Fixed Header来修复两个表的标题.为此,我使用以下脚本.
$(document).ready(function(){
$("#table1").fixedHeader({
height: 160,
adjustWidth: function(th){
if($.browser.msie){
return $(th).width()+10;
}
return $(th).width();
}
});
$("#table2").fixedHeader({
height: 160,
adjustWidth: function(th){
if($.browser.msie){
return $(th).width()+10;
}
return $(th).width();
}
});
})
Run Code Online (Sandbox Code Playgroud)
现在重点是,我正在写两次相同的代码.一次为table1,然后为table2.是否可以只写一次?
| 归档时间: |
|
| 查看次数: |
60 次 |
| 最近记录: |