From 63cc9caadea4ceb0d39e7880129026b92968ed86 Mon Sep 17 00:00:00 2001 From: Eugene Simakin Date: Fri, 23 Sep 2016 18:16:02 +0300 Subject: [PATCH] Hide if only one page check added (issue #126 fixed) --- jquery.twbsPagination.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jquery.twbsPagination.js b/jquery.twbsPagination.js index 43e6163..b68bd75 100644 --- a/jquery.twbsPagination.js +++ b/jquery.twbsPagination.js @@ -32,6 +32,11 @@ throw new Error('Visible pages option is not correct!'); } + // hide if only one page exists + if (this.options.totalPages == 1) { + return this; + } + if (this.options.totalPages < this.options.visiblePages) { this.options.visiblePages = this.options.totalPages; }