div li的多行多列 无刷新分页

PHP Code
- <div class="container">
- <ul id="content">
- <?php for ($i=1; $i<=53; $i++){?>
- <li><span><?php echo $i?></span></li>
- <?php }?>
- </ul>
- <div class="holder"></div>
- </div>
JavaScript Code
- <script type="text/javascript">
- $(document).ready(function() {
- $("div.holder").jPages({
- containerID : "content",
- perPage: 6
- });
- });
- </script>
css
CSS Code
- body {
- text-align: left;
- direction: ltr;
- font-family:tahoma,verdana,arial,sans-serif;
- font-size: 11px;
- }
- .container {
- width: 370px;
- height: 100%;
- margin: 0 auto;
- }
- /*
- @@ Demo
- */
- ul {
- margin: 0;
- padding: 20px 0px;
- }
- ul li {
- list-style-type: none;
- display: inline-block;
- line-height: 100px;
- text-align: center;
- font-weight: bold;
- width: 100px;
- height: 100px;
- margin: 10px;
- background: #ccc;
- }
- ul li span {
- color: #fff;
- padding: 3px;
- }
- /*
- @@ Pagination
- */
- .holder { margin: 5px 0; }
- .holder a {
- font-size: 12px;
- cursor: pointer;
- margin: 0 5px;
- color: #333;
- }
- .holder a:hover {
- background-color: #222;
- color: #fff;
- }
- .holder a.jp-previous { margin-right: 15px; }
- .holder a.jp-next { margin-left: 15px; }
- .holder a.jp-current, a.jp-current:hover {
- color: #ed4e2a;
- font-weight: bold;
- }
- .holder a.jp-disabled, a.jp-disabled:hover { color: #bbb; }
- .holder a.jp-current, a.jp-current:hover,
- .holder a.jp-disabled, a.jp-disabled:hover {
- cursor: default;
- background: none;
- }
- .holder span { margin: 0 5px; }
本例还使用了一个js jquery.pages.js 请到演示页面查看源码
原文地址:http://www.freejs.net/article_fenye_51.html
最近更新
- 响应式全屏手风琴菜单,同时支持垂直方...
- 分组select选择器,支持多选和单...
- jQuery时间日期选择器代码日历插...
- Select 选择器 可以清空的单选...
- jQuery json 无刷新翻页 ...
- 纯css3带倒影效果的图片翻转特效
我爱薅羊毛
点击最多
广告赞助
相关文章
- Infinite-Scroll无限滚动加载数据
- Jquery, Ajax无刷新翻页,支持跳转页面
- jquery 翻页分页
- jquery+php+mysql 无刷新分页翻页
- PHP+Ajax+dataTables无刷新分页演...
- jQuery+Ajax+PHP+Mysql实现分页...