Dear all,
What is the correct way to execute the js code below in a given component:
$(document).ready( function () {
var table = $('"#" + this.htmlObject + " Table"').DataTable();
var pageInfo = table.page.info();
var interval = setInterval(function(){
// "Next" ...
table.page( 'next' ).draw( 'page' );
if ( table.page()+1 === pageInfo.end ) // +1 the current page, since it starts at 0
clearInterval(interval);
}, 3000); // 3 seconds
} );
Thanks in advance.
What is the correct way to execute the js code below in a given component:
$(document).ready( function () {
var table = $('"#" + this.htmlObject + " Table"').DataTable();
var pageInfo = table.page.info();
var interval = setInterval(function(){
// "Next" ...
table.page( 'next' ).draw( 'page' );
if ( table.page()+1 === pageInfo.end ) // +1 the current page, since it starts at 0
clearInterval(interval);
}, 3000); // 3 seconds
} );
Thanks in advance.