提交 686b8b71 编写于 作者: L leon.shi

update documentation

上级 bb7f0842
...@@ -17,15 +17,11 @@ See demos and full documentation at official site: [http://paginationjs.com](htt ...@@ -17,15 +17,11 @@ See demos and full documentation at official site: [http://paginationjs.com](htt
# Quick Start # Quick Start
HTML:
```html ```html
<div id="data-container"></div> <div id="data-container"></div>
<div id="pagination-container"></div> <div id="pagination-container"></div>
``` ```
JS:
```js ```js
$('#pagination-container').pagination({ $('#pagination-container').pagination({
dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195], dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195],
...@@ -64,13 +60,9 @@ $('#pagination-container').pagination({ ...@@ -64,13 +60,9 @@ $('#pagination-container').pagination({
}) })
``` ```
To make it easier to maintain, you'd better use specialized templating engine to rendering data. Such as [Handlebars](http://handlebarsjs.com/) and [Undercore.template](http://underscorejs.org/#template). To make it easier to maintain, you'd better use specialized templating engine to do that. Such as [Handlebars](http://handlebarsjs.com/) and [Undercore.template](http://underscorejs.org/#template).
Fresh examples:
## Handlebars
HTML: ### Handlebars
```html ```html
<script type="text/template" id="template-demo"> <script type="text/template" id="template-demo">
...@@ -82,8 +74,6 @@ HTML: ...@@ -82,8 +74,6 @@ HTML:
</script> </script>
``` ```
JS:
```js ```js
$('#pagination-container').pagination({ $('#pagination-container').pagination({
dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195], dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195],
...@@ -96,9 +86,7 @@ $('#pagination-container').pagination({ ...@@ -96,9 +86,7 @@ $('#pagination-container').pagination({
}) })
``` ```
## Underscore ### Underscore
HTML:
```html ```html
<script type="text/template" id="template-demo"> <script type="text/template" id="template-demo">
...@@ -110,8 +98,6 @@ HTML: ...@@ -110,8 +98,6 @@ HTML:
</script> </script>
``` ```
JS:
```js ```js
$('#pagination-container').pagination({ $('#pagination-container').pagination({
dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195], dataSource: [1, 2, 3, 4, 5, 6, 7, ... , 195],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册