Reset total pages in jquery pagination plugin

后端 未结 5 472
你的背包
你的背包 2021-02-04 05:42

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

5条回答
  •  无人及你
    2021-02-04 06:14

    You can make use of destroy. See here.

    So:

    $('#pagination').twbsPagination('destroy');

    Then reinitialize it:

    $('#pagination').twbsPagination({totalPages:5});

    Fiddle

提交回复
热议问题