Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[gh-pages] Update version from 1.4 to 1.4.1
  • Loading branch information
Eugene Simakin committed Sep 29, 2016
1 parent c7a489a commit dae0002
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions js/jquery.twbsPagination.js
@@ -1,5 +1,5 @@
/*!
* jQuery pagination plugin v1.4
* jQuery pagination plugin v1.4.1
* http://esimakin.github.io/twbs-pagination/
*
* Copyright 2014-2016, Eugene Simakin
Expand Down Expand Up @@ -32,19 +32,20 @@
throw new Error('Visible pages option is not correct!');
}

if (this.options.onPageClick instanceof Function) {
this.$element.first().on('page', this.options.onPageClick);
}

// hide if only one page exists
if (this.options.totalPages == 1) {
if (this.options.hideOnlyOnePage && this.options.totalPages == 1) {
this.$element.trigger('page', 1);
return this;
}

if (this.options.totalPages < this.options.visiblePages) {
this.options.visiblePages = this.options.totalPages;
}

if (this.options.onPageClick instanceof Function) {
this.$element.first().on('page', this.options.onPageClick);
}

if (this.options.href) {
this.options.startPage = this.getPageFromQueryString();
if (!this.options.startPage) {
Expand Down Expand Up @@ -282,6 +283,7 @@
startPage: 1,
visiblePages: 5,
initiateStartPageClick: true,
hideOnlyOnePage: false,
href: false,
pageVariable: '{{page}}',
totalPagesVariable: '{{total_pages}}',
Expand Down Expand Up @@ -310,6 +312,6 @@
return this;
};

$.fn.twbsPagination.version = "1.4";
$.fn.twbsPagination.version = "1.4.1";

})(window.jQuery, window, document);

0 comments on commit dae0002

Please sign in to comment.