Freeze left column (case scrollX)

Freeze left column (case scrollX)

torchatptorchatp Posts: 3Questions: 0Answers: 0
edited August 2010 in Plug-ins
var timer;

$('div.dataTables_scrollBody').scroll(function() {
var self = $(this);
if (timer) {
clearTimeout(timer);
timer = null;
}
timer = setTimeout(function() {
//$('td.locked').css("left", $('div.dataTables_scrollBody').scrollLeft());
$('#example td.sorting_1').css("left", $('div.dataTables_scrollBody').scrollLeft());
}, 300);

});

Replies

  • allanallan Posts: 55,114Questions: 1Answers: 8,654 Site admin
    Sorry for the daft question - but how do you make this work? Does it need to go into a specific part of the DataTables code? The draw callback for example?

    Thanks,
    Allan
This discussion has been closed.