ajaxPager icon indicating copy to clipboard operation
ajaxPager copied to clipboard

Bug in previous/next page handlers

Open gibson3659 opened this issue 12 years ago • 1 comments

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]); },

gibson3659 avatar Feb 12 '13 04:02 gibson3659

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?

cutterbl avatar Feb 12 '13 10:02 cutterbl