josecebe/twbs-pagination

Access to total pages variable

psukys opened this issue · 2 comments

As far as I managed to find, there's only a way to retrieve current page through:

.twbsPagination('getCurrentPage');

Is there a way to do this, or should there be an extension like:

.twbsPagination('getTotalPages');

you can implement code to jquery.twbsPagination.min.js by adding some code.
Let find getCurrentPage function and insert this code after it.

getTotalPages:function(){return this.options.totalPages}

now you can get total pages by

pagination.twbsPagination('getTotalPages');

I have implemented this method into 'master', and it will be available in 1.4.2 tag on August 1, 2018.