ItsNick
Member
- Nov 19, 2013
- 96
- 15
In the housekeeping, tables are shown regularly, but have no pagination. I've looked around and can't seem to get them to use datatables to help with that. There's no JS errors thrown.
Any ideas?
For each table, I am using <table class=datatables> etc...
EDIT: Solution found. All tables needed to be formatted with <thead> and <tbody> tags perfectly.
Any ideas?
PHP:
$(document).ready(function () {
if($('.datatables').length>0){
$('.datatables').dataTable();
$('.dataTables_paginate').addClass('btn-group datatable-pagination');
$('.dataTables_paginate > a').wrapInner('<span />');
$('.dataTables_paginate > a:first-child').append('<i class="icon-chevron-left shaded"></i>');
$('.dataTables_paginate > a:last-child').append('<i class="icon-chevron-right shaded"></i>');
$( '.slider-range').slider({
range: true,
min: 0,
max: 20000,
values: [ 3000, 12000 ],
slide: function(event, ui) {
$(this).find('.ui-slider-handle').attr('title', ui.value);
},
});
For each table, I am using <table class=datatables> etc...
EDIT: Solution found. All tables needed to be formatted with <thead> and <tbody> tags perfectly.
Last edited: