Mobile version is not working in my table
Mobile version is not working in my table
redsunset
Posts: 44Questions: 15Answers: 0
Hi all,
I have a table and I would love to implement the responsive mobile version.
here is what I am including
`<link rel="stylesheet" href="/css/awesome-bootstrap-checkbox.css">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/bs4/dt-1.10.18/datatables.min.css"/>
<link rel="stylesheet" href="/css/layout.css">
<link type="text/css" href="//gyrocode.github.io/jquery-datatables-checkboxes/1.2.11/css/dataTables.checkboxes.css" rel="stylesheet" />
<script charset="utf-8" src="//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script charset="utf-8" src="//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js"></script>
<script charset="utf-8" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.17.0/jquery.validate.min.js"></script>
<script type="text/javascript" src="//gyrocode.github.io/jquery-datatables-checkboxes/1.2.11/js/dataTables.checkboxes.min.js"></script>
<!-- Responsive Plugins -->
<script charset="utf-8" src="https://cdn.datatables.net/rowreorder/1.2.5/js/dataTables.rowReorder.min.js"></script>
<script charset="utf-8" src="https://cdn.datatables.net/responsive/2.2.3/js/dataTables.responsive.min.js"></script>
<link href="https://cdn.datatables.net/rowreorder/1.2.5/css/rowReorder.dataTables.min.css" rel="stylesheet" type="text/css" />
<link href="https://cdn.datatables.net/responsive/2.2.3/css/responsive.dataTables.min.css" rel="stylesheet" type="text/css" />`
And I added:
` // activate responsive plugin
rowReorder: {
selector: 'td:nth-child(2)'
},
responsive: true,
// END`
But the responsive plugin is not working at all ![]()
Thank you very much for any help in advance.
best greetings
This discussion has been closed.
Replies
Not sure but my guess is you have the width set to a specific size so the table doesn't adjust with the size of the page.
<table class="datatable" id="table_cards" style="width:900px !important;">See this example for a flexible table width:
https://datatables.net/examples/basic_init/flexible_width.html
Kevin
working perfectly now! Thank you very very much!