I had previously posted regarding this 7 months ago, and someone was kind enough to point me to the right solution: bootstrap 3 responsive table with fixed first column
However, this suddenly stopped working, and the fixed column is no longer fixed. To see it in action, go to: http://nasgame.apphb.com (example data: search for Matt Vincent and pick the Pro)
The first column now scrolls with the rest of the content.
This is the operative code:
jquery
$(function(){
var $table = $('.table');
//Make a clone of our table
var $fixedColumn = $table.clone().insertBefore($table).addClass('fixed-column');
//Remove everything except for first column
$fixedColumn.find('th:not(:first-child),td:not(:first-child)').remove();
//Match the height of the rows to that of the original table's
$fixedColumn.find('tr').each(function (i, elem) {
$(this).height($table.find('tr:eq(' + i + ')').height());
});
});
css
.table-responsive>.fixed-column {
position: absolute;
display: inline-block;
width: auto;
border-right: 1px solid #ddd;
}
@media(min-width:768px) {
.table-responsive>.fixed-column {
display: none;
}
}