Home >php教程 >php手册 >Share a set of JQ paging plug-ins written by yourself

Share a set of JQ paging plug-ins written by yourself

WBOY
WBOYOriginal
2016-11-19 13:05:251156browse

Supports 4 paging modes, 1: Normal link paging 2: Click the paging button 3: Click to load more 4: Pull down to load more
Share a set of JQ paging plug-ins written by yourself
Share a set of JQ paging plug-ins written by yourself

Currently only 4 paging modes are supported
1: Ordinary link paging
Ajax:
2: Click the paging button
3: Click to load more
4: Pull down to load more// 1 Ordinary paging<br> var config = ({<br> Mode : 1,                                                                                                                           PageBer: 2,                                                                                                                                                                                                                                                                            ​  PageMax: 10,                                                                                                         PageUrl: 'http://127.0.0.1/1/1.php?page=[#]', //Page link with page break <br> PageId : 'Page', //HTML ID inserted into the paging Page entity<br> PageCid: 'tbinfo', //HTML ID inserted into paginated content<br> PageHtml: '<tr><td><input name="ckbox" value="" type="checkbox"></td><td>[0]</td><td&gt ;<a>[1]</a></td><td>[2]</td><td class="text-right"><a href="[0 ]">Delete</a></td></tr>',                                                                             PageArray: '<?php echo $array; ?>',//Paging content after JSONization<br> Page : '<?php echo $page;?>', //Current number of pages<br> PageNum : '<?php echo $num; ?>',//Total number of paging records<br> });<br> JunPage(config);<br> //Call paging <br><br>// 2. ajax click button to paginate <br> var config = ({<br> Mode : 2,                                                                                                                                       PageBer:2, PageMax: 10,                                                                                                                                                                         PageUrl: 'http://127.0.0.1/1/index.php?page=[#]', //Page link with page break PageId : 'Page', //HTML ID inserted into the paging Page entity
PageCid: 'tbinfo', //HTML ID inserted into paginated content
PageHtml: '[0][1][2]Delete',                                                                                                                                                                                                              ​  PageArray: '',                                                                                                                                                                   Page: 1, PageNum: '',                                                                                                                                                                                                                                                                                           ​  /*Paging parameters in Ajax mode*/
Ajax: 'get', // ajax mode
AjaxNo: 'index.php', //The file name that needs to be replaced in the paging does not need to be replaced and is set to null
AjaxYes: 'ajax_1.php', //File name for paging replacement

});
JunPage(config);

// 3.ajax click to load more
var config = ({
Mode : 3,                                                                                                                               PageBer: 2,                                                                                                                                                                                                             ​  PageMax: 10,                                                                                                                                                                         PageUrl: 'http://127.0.0.1/1/index.php?page=[#]', //Page link with page break PageId : 'Page', //HTML ID inserted into the paging Page entity
PageCid: 'tbinfo', //HTML ID inserted into paginated content
PageHtml: '[0][1][2]Delete',                                                                                                                                                                                                                    ​  PageArray: '',                                                                                                                 Page : 1,                                                                                                                                                                                                                                                                                                   ​ PageNum: '',                                                                                                                                                                                                                                                                                          ​  /*Paging parameters in Ajax mode*/
Ajax:'get', AjaxNo: 'index.php', //The file name that needs to be replaced in the paging does not need to be replaced and is set to null
AjaxYes: 'ajax_2.php', //File name for paging replacement

});
JunPage(config);

// 4.ajax download and load more
var config = ({
Mode : 4,                                                                                                                                   PageBer: 10,                                                                                                                                                                                               ​ PageMax: 10,                                                                                                                                                                         PageUrl: 'http://127.0.0.1/1/index.php?page=[#]', //Page link with page break
PageId : 'Page', //HTML ID inserted into the paging Page entityPageCid: 'tbinfo', //HTML ID inserted into paginated content
PageHtml: '[0][1][2]Delete',                                                                                                                                                                                                                    ​  PageArray: '',                                                                                                                 Page : 1,                                                                                                                                                                                                                                                                                                   ​ PageNum: '',                                                                                                                                                                                                                                                                                          ​  /*Paging parameters in Ajax mode*/
Ajax:'get', AjaxNo: 'index.php', //The file name that needs to be replaced in the paging does not need to be replaced and is set to null
AjaxYes: 'ajax_3.php', //File name for paging replacement

});
JunPage(config);
The code has been uploaded to the group file

QQ group number: 368405253



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn