Can I add a number (1000) to info _START_ ?
Can I add a number (1000) to info _START_ ?
jjiang5
Posts: 14Questions: 4Answers: 1
Hi,
Can I add a number (1000) to START , I want START to start with 1001, for example.
$('#example').dataTable( {
"language": {
"info": "Showing START to END of TOTAL entries"
}
} );
Thanks
Jin
Answers
Not with the
language.info
as that's a hardcoded value, but you can create your own to over-write what's there - something like this,Colin
Colin,
Thank you for your quick response. I will try.
Jin
Colin,
Works.
Thanks
Jin
Colin,
Somehow below datatable info text displays empty , could you help?
Edited by Kevin: Syntax highlighting. Details on how to highlight code using markdown can be found in this guide
I suspect the problem is the
draw
event comes after thepage
event so the -event draw
event is updating the info element with whatever is inlanguage.info
. If you are doing what Colin's example shows the the empty text is overwriting your line 4 statement. Use thedraw
event as Colin shows.If this doesn't work for you please provide a link to your page or a test case replicating the issue so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Kevin,
Thanks for help.
When I use draw, it works.
Thanks
Jin