I Want To Use Div Structure In Datatables Instead Of Table. Is It Possible?
I want to use Datatables with div structure instead of tables. the purpose is to meet design requirements. is there any possible way or any alternative for that?
Solution 1:
No you will not be able to do this... The core of Datatables will only work on table elements and child thead tbody tfooter tr td th elements... You will need to write your own pagination code to handle your div cards or download another plugin... jquery Datatables will not support that.
here is a good one? This even looks like jquery datatables pagination. https://esimakin.github.io/twbs-pagination/#demo
Solution 2:
Sure you can! I think what you're looking for is manipulating the dom object of Datatables!
A simple example of adding some divs to the table ->
$('#example').dataTable({
dom: '<"top"i>rt<"bottom"flp><"clear">'
});
This will give you wrapper divs around table content, filters and the whole table. You can learn more by reading the official documentation from their website. Here's a link to the documentation ->https://datatables.net/reference/option/dom
Post a Comment for "I Want To Use Div Structure In Datatables Instead Of Table. Is It Possible?"