jquery Dynamic Paging Bootpag plugin __javascript

Source: Internet
Author: User

Display section on the page:

<div class= "Box-tools" >
<div id= "pagination" style= "margin-top:10px;" >
<ul class= "Pagination Bootpag" >
<li data-lp= "1" class= "Disabled" "><a href=" javascript:void (0); " > Home </a></li>
<li data-lp= "1" class= "prev Disabled" ><a href= "javascript:void (0);" >«</a></li>
<li data-lp= "1" class= "active" ><a href= "javascript:void (0);" >1</a></li>
<li data-lp= "2" ><a href= "javascript:void (0);" >2</a></li>
<li data-lp= "3" ><a href= "javascript:void (0);" >3</a></li>
<li data-lp= "4" ><a href= "javascript:void (0);" >4</a></li>
<li data-lp= "5" ><a href= "javascript:void (0);" >5</a></li>
<li data-lp= "6" ><a href= "javascript:void (0);" >6</a></li>
<li data-lp= "7" ><a href= "javascript:void (0);" >7</a></li>
<li data-lp= "8" ><a href= "javascript:void (0);" >8</a></li>
<li data-lp= "2" class= "Next" ><a href= "javascript:void (0);" >»</a></li>
<li data-lp= "8" class= "Last" ><a href= "javascript:void (0);" > Last </a></li>
</ul>
</div>

</div>

$ (function () {
$ (' [data-toggle= ' popover] '). PopOver ();
$ (' #pagination '). Bootpag ({
Total: ' ${page.totalpages} ',//how many pages altogether
Page: ' ${page.number + 1} ',//number of pages currently displayed, the component is starting from 1
Maxvisible:10,//The number of pages you can see
Firstlastuse:true,
First: ' Home ',
Last: ' End ',
Wrapclass: ' Pagination ',
Activeclass: ' Active ',
Disabledclass: ' Disabled ',
Nextclass: ' Next ',
Prevclass: ' prev ',
Lastclass: ' Last ',
FirstClass: ' A '
}. On ("page", function (event, num) {//page number of pages you clicked, starting from 1
$ ("#p"). Val (num);
$ ("#query_form"). Submit ();
});

}

In the background, you just have to pass the data to the page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.