Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
FixedColumn Integration Sync Scroll
Synchronize scroll between dataTables_scrollBody and fixedHeader-scroll
  • Loading branch information
fazlurr committed Oct 6, 2016
commit d90725a0cd54e5017fc261d0136b06b05173a75d
32 changes: 32 additions & 0 deletions css/fixedHeader.dataTables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,35 @@ table.fixedHeader-locked {
display: none;
}
}

.fixedHeader-container {
position: fixed;
top: 50px;
z-index: 99;
overflow: hidden;
box-shadow: 0 3px 5px rgba(222, 222, 222, 0.65);
}
.fixedHeader-scroll {
position: relative;
width: 100%;
overflow: hidden;
}
.table-analyze-results.fixedHeader-floating {

}
.fixedHeader-container table.fixedHeader-floating {
position: relative !important;
top: 0 !important;
left: 0 !important;
}
.DTFH_Wrapper {
position: absolute;
top: 0;
z-index: 999;
}
.DTFH_LeftWrapper {
left: 0;
}
.DTFH_RightWrapper {
right: 0;
}
6 changes: 6 additions & 0 deletions js/dataTables.fixedHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ $.extend( FixedHeader.prototype, {
.append( itemElement )
.appendTo( itemScroll );

// Sync Scroll with scrollBody
var tableScrollBody = $(".dataTables_scrollBody");
tableScrollBody.scroll( function() {
itemScroll.scrollLeft( tableScrollBody.scrollLeft() );
});

var itemElementLeft = itemElement;
var itemElementRight = itemElement;

Expand Down