I am using Stupid Fixed Header to fix the headers of two tables. For that i am using following script.
$(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();
}
});
})
Now the point is, i am writing the same code twice. Once for table1 and then for table2. Is it possible to write it only once?