I am using TwbsPagination plug in for displaying paging in my app. It is working fine when we set the page size while initializing. However, based on the search result, I want t
Read the twbs-pagination source code
here tells why you failed to reset total page :
var data = $this.data('twbs-pagination');
if (!data) $this.data('twbs-pagination', (data = new TwbsPagination(this, options) ));
Viewstate param twbs-pagination exists, so you cannot re-render.
here is the solution to delete viewstate:
TwbsPagination.prototype = {
destroy: function () {
this.$element.empty();//remove child nodes
this.$element.removeData('twbs-pagination');//remove viewstate
this.$element.off('page');//unbind $(this) node from page
return this;
},
So you can call destroy
method @Robin Carlo Catacutan
OR manually execute inner method @Vipin Kohli