I have a paginated jQuery DataTable that I would like to scroll to a specific row. This row may be on another page. I am currently trying the following:
var scroller = profileTable.fnSettings().nTable.parentNode;
scroller.scrollTo( $('.row_selected'), 1 );
where profileTable
is a DataTable.
The row I would like to scroll to has a <tr class="row_selected">
.
The Javascript error I am seeing in Chrome's Developer Tools is:
Uncaught TypeError: Object #<HTMLDivElement> has no method 'scrollTo'
I also tried
var scroller = profileTable.fnSettings().nTable.parentNode;
$(scroller).scrollTo( $('.row_selected'), 1 );
with error:
Uncaught TypeError: Object [object Object]> has no method 'scrollTo'
I've tried the ScrollTo Plugin with no luck. Anybody using this plugin with jQuery 1.7.2 or higher?
Any examples of moving to a specified row in a DataTable would be appreciated.