Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions jquery.simplePagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
invertPageOrder: false,
useStartEdge : true,
useEndEdge : true,
usePrev: true,
useNext: true,
hideNextPrev: false,
onPageClick: function(pageNumber, event) {
// Callback triggered when a page is clicked
// Page number is given as an optional parameter
Expand Down Expand Up @@ -169,12 +172,12 @@
var $panel = tagName === 'UL' ? this : $('<ul' + (o.listStyle ? ' class="' + o.listStyle + '"' : '') + '></ul>').appendTo(this);

// Generate Prev link
if (o.prevText) {
if (o.prevText && o.usePrev && (!o.hideNextPrev || o.currentPage != 0)) {
methods._appendItem.call(this, !o.invertPageOrder ? o.currentPage - 1 : o.currentPage + 1, {text: o.prevText, classes: 'prev'});
}

// Generate Next link (if option set for at front)
if (o.nextText && o.nextAtFront) {
if (o.nextText && o.nextAtFront && o.useNext && (!o.hideNextPrev || o.currentPage != o.pages - 1)) {
methods._appendItem.call(this, !o.invertPageOrder ? o.currentPage + 1 : o.currentPage - 1, {text: o.nextText, classes: 'next'});
}

Expand Down Expand Up @@ -254,7 +257,7 @@
}

// Generate Next link (unless option is set for at front)
if (o.nextText && !o.nextAtFront) {
if (o.nextText && !o.nextAtFront && o.useNext && (!o.hideNextPrev || o.currentPage != o.pages - 1)) {
methods._appendItem.call(this, !o.invertPageOrder ? o.currentPage + 1 : o.currentPage - 1, {text: o.nextText, classes: 'next'});
}
},
Expand Down