Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update jquery.twbsPagination.js
We would definitely require reset paging functionality which will recreate the paging for the same paging container. I believed, this would be the right way of doing it.
Use Case: 
--------
Reset the content after traversing to page 5
Steps:
------
1. Update the content
2. User select the page number 5. Paging container shows paging options as First, Previous, 3,4,5, Next, Last
3. Updates Content with the different set of result which has more content
4. Paging has to be reset from start index 1
  • Loading branch information
natrajsr committed Apr 29, 2014
1 parent 9d760e9 commit e4dc931
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jquery.twbsPagination.js
Expand Up @@ -244,6 +244,10 @@

return ( methodReturn === undefined ) ? $this : methodReturn;
};

$.fn.resetPaging = function () {
$(this).data('twbs-pagination', null);
};

$.fn.twbsPagination.defaults = {
totalPages: 0,
Expand Down

0 comments on commit e4dc931

Please sign in to comment.