Skip to content

Commit

Permalink
Merge pull request #23 from thegrandpoobah/fix22
Browse files Browse the repository at this point in the history
Makes dataTables.scroller work with DataTables 1.9.x.
  • Loading branch information
Allan Jardine committed Jul 11, 2014
2 parents f32487b + 97aee05 commit 207d0ad
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions js/dataTables.scroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,10 +887,17 @@ Scroller.prototype = /** @lends Scroller.prototype */{

$('div.'+dt.oClasses.sScrollBody, container).append( nTable );

container.appendTo( dt._bInitComplete ?
origTable.parentNode :
dt.nHolding
);
var appendTo;
if (dt._bInitComplete) {
appendTo = origTable.parentNode;
} else {
if (!this.s.dt.nHolding) {
this.s.dt.nHolding = $( '<div></div>' ).insertBefore( this.s.dt.nTable );
}
appendTo = this.s.dt.nHolding;
}

container.appendTo( appendTo );
this.s.heights.row = $('tr', tbody).eq(1).outerHeight();
container.remove();
},
Expand Down

0 comments on commit 207d0ad

Please sign in to comment.