rem:  var html = $(this).html(); if (html == ' ') { html = '&nbsp;'; } if ($(this).children().size() == 0) { html = '<span>'+ html +'</span>'; } 
add:  var html = $(this).html(); if (html == ' ') { html = '&nbsp;'; } if ($(this).children().size() == 0) { html = '<span>'+ html +'</span>'; } 
context:   $(document).ready(function() {    var z = 0;    $('table thead').each(function () {      // Find table height.      var table = $(this).parent('table')[0];      var height = $(table).addClass('sticky-table').height();      var i = 0;      // Find all header cells.      $('th', this).each(function () {        // Ensure each cell has an element in it.        var html = $(this).html();        if (html == ' ') {          html = '&nbsp;';        }        if ($(this).children().size() == 0) {          html = '<span>'+ html +'</span>';        }        // Clone and wrap cell contents in sticky wrapper that overlaps the cell's padding.        $('<div class="sticky-header" style="position: fixed; visibility: hidden; top: 0px;">'+ html +'</div>').prependTo(this);        var div = $('div.sticky-header', this).css({          'marginLeft': '-'+ $(this).css('paddingLeft'),          'marginRight': '-'+ $(this).css('paddingRight'),          'paddingLeft': $(this).css('paddingLeft'),          'paddingTop': $(this).css('paddingTop'),          'paddingBottom': $(this).css('paddingBottom'),          'z-index': ++z        })[0];        cells.push(div);        // Adjust width to fit cell/table.        var ref = this;        if (!i++) {          // The first cell is as wide as the table to prevent gaps.          ref = table;          div.wide = true;        }        $(div).css('width', parseInt($(ref).width())                          - parseInt($(div).css('paddingLeft')) +'px');        // Get position and store.        div.cell = this;        div.table = table;        div.stickyMax = height;        div.stickyPosition = Drupal.absolutePosition(this).y;      });    });  });
meta: 3650	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3650/c11cb4ec24479e801076c094f043f2084b344d0c/tableheader.js/buggy/misc/tableheader.js