reset = function(){
                var border_width = parseInt($table.find('th,td').css('border-width')) + parseInt($table.css('border-spacing'))*2;
                var thead_height = $table.find('thead').outerHeight(true)+border_width;
                var thead_width = border_width;
                $table.find('thead').find('td,th').each(function(index){
                    if(index<options.fixedColumnCount){
                        thead_width += $(this).outerWidth(true);
                    }
                });
                $fixed_corner.html($table.clone()).width(thead_width).height(thead_height);
                $fixed_header.html($table.clone()).height(thead_height);
                $fixed_column.html($table.clone()).width(thead_width);
            }
jquery.tablefixed.js 1.0
http://jquerywidget.com