How can I change the jQuery FixedTableHeader plugin to have a fixed first column?

I am using the jQuery plugin from here http://www.tablefixedheader.com/ to create an awesome table with a fixed header, sorting and other interesting features. Now I also looked at jqGrid, which looks ridiculously awesome, but we do some funky things with our data source, and I don’t think that it is quite ready to play well with jqGrid.

In any case, my bosses want the first column of the table I created to be fixed, so they can scroll along the x axis, but they still see the first column. How can I modify this plugin to provide this functionality?

Any help is appreciated

thank

EDIT:

I tried adding:

th:first-child
{
    position        : relative; 
}
td:first-child
{
    position        : relative; 
}

"", , ...

, . , , .

2:

, , . , :

, ...

, , this.offset.top null ... blah,

document.ready:

         var currentTop = 0;
         var currentLeft = 0;
         var currentWidth = 0;
         var currentHeight = 0;
         var currentContent = "";
         var currentDiv = "";
         var currentID = "";
         $('td:first-child').each(function (index) {
             currentTop = $(this).offset.top;
             currentLeft = $(this).offset.left;
             currentWidth = $(this).width;
             currentHeight = $(this).height;
             currentContent = $(this).html();
             currentID = "fixed_column_cell" + index;
             currentDiv = "<div class=\"fixed_column_cells\" id=\"" + currentID + "\">" + currentContent + "</div>";
             $('body').append(currentDiv);
             $('#' + currentID).offset({ top: currentTop, left: currentLeft });
             $('#' + currentID).width(currentWidth);
             $('#' + currentID).width(currentHeight);
         });
         $('fixed_column_cells').css('position', 'fixed');

+5
2

. , , (TD) . , td: first-childs divs , TD. divs .

, - .

Pseduocode:

  • div
  • div
  • div fixed pos
+2

, , jquery . , . Fixed Table, , . , .

0

All Articles