Conditionally show page selection
Conditionally show page selection
Hello,
Is there a way to set 'p' option in dom if the number of pages > 1 ? ie., if there is only one page worth of data to display, I would like to skip showing pagination.
Regards,
Harsha
This discussion has been closed.
Answers
Hi @hnhegde ,
Not as such, the
dom
, andpaging
can only be set at initialisation. If your data is in the DOM, you can run a check before initialising (something like this). If the data comes from an Ajax, you would have to count the rows returned and then reinitialise.Hope that helps,
Colin
Hi @colin ,
After scouring over more forum threads, came across this wonderful plugin: conditionalPaging
Thanks for the response. That technique worked. But the lazy coder in me wanted something bite size
Wonder why this is not listed in the official list of plugins.
Regards,
Harsha
Hi @hnhegde ,
Nice, I wasn't aware of that either
Cheers,
Colin