Bootpag is simple jQuery plugin which helps you create dynamic pagination. Additionally it works well with twitter bootstrap.
When dynamic pagination is needed?Whenever our page uses heavy asynchronous loading and we don't know exact number of paginated pages until we make some AJAX requests. Also when our total number of pages changes - for example when we implement dynamic search feature.
First of all we need to download bootpag plugin. Let's create basic HTML page. We should prepare HTML elements where we will show content of dynamic loaded pages.