How to create paging effect with jquery
Mar 15, 2018 am 11:42 AM
jquery
Pagination
Effect
This time I will show you how to create a paging effect with jquery. What are the precautions for using jquery to create a paging effect? ??The following is a practical case, let’s take a look.
A simple paging effect based on jquery.page.js, for your reference, the specific content is as follows<!DOCTYPE html>? <html>? <head>? <meta charset="utf-8" />? <title>簡單的jQuery分頁插件</title>? <style>? *{?margin:0;?padding:0;?list-style:none;}? a{?text-decoration:none;}? a:hover{?text-decoration:none;}? .tcdPageCode{padding:?15px?20px;text-align:?left;color:?#ccc;text-align:center;}? .tcdPageCode?a{display:?inline-block;color:?#428bca;display:?inline-block;height:?25px;?line-height:?25px;?padding:?0?10px;border:?1px?solid?#ddd;?margin:?0?2px;border-radius:?4px;vertical-align:?middle;}? .tcdPageCode?a:hover{text-decoration:?none;border:?1px?solid?#428bca;}? .tcdPageCode?span.current{display:?inline-block;height:?25px;line-height:?25px;padding:?0?10px;margin:?0?2px;color:?#fff;background-color:?#428bca;?border:?1px?solid?#428bca;border-radius:?4px;vertical-align:?middle;}? .tcdPageCode?span.disabled{?display:?inline-block;height:?25px;line-height:?25px;padding:?0?10px;margin:?0?2px;?color:?#bfbfbf;background:?#f2f2f2;border:?1px?solid?#bfbfbf;border-radius:?4px;vertical-align:?middle;}? </style>? </head>? <body>? <br><br><br>? <p class="tcdPageCode"></p>? <center><pre class="brush:php;toolbar:false"><br>?? ? ? <script>? ??$(".tcdPageCode").createPage({? ????pageCount:100,? ????current:1,? ????backFn:function(p){? ??????console.log(p);? ????}? ??});? </script>? ?