i am using knockout with jquery to implement the infinite scroll. but the scroll method in the viewModel is not being fired.
i have followed the below url to implement the same.
please do let me know if am missing something here.
below is the view and viewModel
View:
<table id ="searchResultsTable" style="height: 500px; overflow: scroll;">
<tbody data-bind="foreach: rowResults, event: {scroll: scrolled}" style="height: 500px; ">
!----some TR's---!
</tbody>
</table>
ViewModel:
public scrolled(data: any, event: any) {
var elem = event.target;
if (elem.scrollTop > (elem.scrollHeight - elem.offsetHeight - 200)) {
this.getSearchResults();
}
}