ajaxPager
ajaxPager copied to clipboard
Bug in previous/next page handlers
Found a bug in the PageHandlers. Fix is shown below using parseInt.
previousPageHandler: function(event){ $(this).trigger('optionchange',['page', settings.page, parseInt(settings.page)-1]); }, lastPageHandler: function(event){ var $self = $(this), data = $(this).data('ajaxPager'); $(this).trigger('optionchange',['page', settings.page, data.totalpages]); }, nextPageHandler: function(event){ $(this).trigger('optionchange',['page', settings.page, parseInt(settings.page)+1]); },
Which version of ajaxPager are you using? Which version of Bootstrap? JQuery? These things will help me move forward with this.
Why is it that you believe that parseInt() is necessary here? Shouldn't settings.page already be an int?