Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dataTables: no paging buttons

I'm trying to use dataTables inside a JIRA gadget and after my table is ready there are no pagination buttons available. I have a table and I'm using the dataTables in a simpliest way: $("#mytableid").dataTable();

After browsing elements of my page I can see that the corresponding div's are empty:

<div class="dataTables_paginate paging_two_button" id="mytableid_paginate">
    <div class="paginate_disabled_previous" title="Previous" id="mytableid_previous"></div>
    <div class="paginate_enabled_next" title="Next" id="mytableid_next"></div>
</div>

I assume that there should be some logic for buttons, etc. Any ideas of why this is happening?

I've tried to switch to "full_numbers", there I can see just a simple text "FirstPrevious123...NextLast" in one row without any button functionality.

I suppose that something isn't going the right way after parsing my table, but I don't know where to search. Any hints?

My table doesn't have part. And there are no css styles applied. dataTables 1.8.4, jquery 1.6.4

like image 569
gat0r Avatar asked Oct 13 '11 07:10

gat0r


People also ask

How do I hide pagination buttons?

By applying "bPaginate": false will take disable the whole pagination.

How to disable DataTables pagination?

Use bPaginate option to disable pagination. Use paging option to disable pagination. $('#example'). dataTable({ "paging": false });

What is paging in DataTable?

The paging option is used to specify whether the paging of the DataTable is enabled or not. The DataTable splits the records being shown in multiple pages so that only a certain number of records are shown on a page. The number of records to show can be selected using the dropdown menu.


1 Answers

i think that the problem is that you are not loading datatables css. You should include the file demo_table.css

like image 133
Nicola Peluchetti Avatar answered Sep 19 '22 22:09

Nicola Peluchetti