problem with api scrollTo that is "not a function"
problem with api scrollTo that is "not a function"
FireFoxII
Posts: 17Questions: 10Answers: 0
Hi and sorry for my english...
I'm trying to implement scroller in my datatable that have more than 2000 rows...
This is my function
var table = $("#table").DataTable({
"columnDefs": [
{
"targets": [0],
"searchable": false
},
],
"lengthMenu": [25, 50, 75, 100],
"language": {
"url": "../plugins/datatables/it_IT.txt"
},
"deferRender" : true,
"scroller": true,
"ajax": "load_data.php",
"scrollCollapse": true,
"initComplete": function () {
this.api().row( 100 ).scrollTo();
}
});
Proplem was that I have this error in chrome console
Uncaught TypeError: this.api(...).row(...).scrollTo is not a function
How to resolve this?
This discussion has been closed.
Answers
First thing to do is make sure you are using the latest versions of DataTables and Scroller.
If that doesn't fix it, please link to a test case showing the issue, per the forum rules.
Allan
Thanks... But now with latest version I get this error
Uncaught TypeError: Cannot read property 'appendChild' of undefined
Example here
http://live.datatables.net/rogugiri/1/edit
Two issues I can see:
scrollY
). Scroller should probably detect that and not initialise, but if you want to use scroller you need to have scrolling enabled.data
rather thanajax
.Allan