Fixed a bug in which the paging controls would fade out after table initialization if the "fade" style was chosen

pull/172/head
Matthew Hasbach 10 years ago
parent 6dd3a6c999
commit cbad0bd293

@ -34,10 +34,12 @@
var config = $.isPlainObject(options) ? options : {},
api = new $.fn.dataTable.Api(dtSettings),
speed = 'slow',
conditionalPaging = function() {
var $paging = $(api.table().container()).find('div.dataTables_paginate');
conditionalPaging = function(e) {
var $paging = $(api.table().container()).find('div.dataTables_paginate'),
pages = api.page.info().pages;
if (api.page.info().pages <= 1) {
if ($.isPlainObject(e)) {
if (pages <= 1) {
if (config.style === 'fade') {
$paging.stop().fadeTo(speed, 0);
}
@ -53,6 +55,15 @@
$paging.css('visibility', '');
}
}
}
else if (pages <= 1) {
if (config.style === 'fade') {
$paging.css('opacity', 0);
}
else {
$paging.css('visibility', 'hidden');
}
}
};
if ($.isNumeric(config.speed) || $.type(config.speed) === 'string') {

Loading…
Cancel
Save