Infinite scroll and window resize

Infinite scroll and window resize

markomarko Posts: 2Questions: 0Answers: 0
edited July 2011 in DataTables 1.8
I'm trying to implement a data table with infinite scroll, whose height is about the height of page and when user resizes the window, the table is resized as well. This is how i tried to do it:

[code]
$(window).resize(function () {
var rows = parseInt(($(window).height() - 100) / 55);
dataTable.dataTable().fnLengthChange(rows);

dataTable.dataTable().fnAdjustColumnSizing();

var scrollPos = $(window).height() - 220;
var settings = dataTable.fnSettings();
settings.oScroll.sY = scrollPos;
});
[/code]

But the problem with this is that it executes two queries and i get duplicated entries. Is there any way i can do what i want?
This discussion has been closed.