From 5ba0987f52689ae13fca041f1e82a728d60675f4 Mon Sep 17 00:00:00 2001 From: Matthew Hasbach Date: Sun, 22 Mar 2015 15:24:17 -0400 Subject: [PATCH] Use fadeTo instead of fadeIn / fadeOut and CSS visibility instead of show / hide in order to preserve page layout --- .../dataTables.conditionalPagination.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/conditionalPagination/dataTables.conditionalPagination.js b/features/conditionalPagination/dataTables.conditionalPagination.js index b259c31..fc64037 100644 --- a/features/conditionalPagination/dataTables.conditionalPagination.js +++ b/features/conditionalPagination/dataTables.conditionalPagination.js @@ -39,18 +39,18 @@ if (api.page.info().pages <= 1) { if (config.style === 'fade') { - $pagination.stop().fadeOut(speed); + $pagination.stop().fadeTo(speed, 0); } else { - $pagination.hide(); + $pagination.css('visibility', 'hidden'); } } else { if (config.style === 'fade') { - $pagination.stop().fadeIn(speed); + $pagination.stop().fadeTo(speed, 1); } else { - $pagination.show(); + $pagination.css('visibility', ''); } } };