Skip to content

Commit b0f6d0b

Browse files
Add pagination example
1 parent 1f22eb0 commit b0f6d0b

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

_examples/pagination_example.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
layout: socket_example
3+
title: Pagination example
4+
permalink: /examples/pagination/
5+
description: An example of the pagination in TutorCruncher socket.
6+
---
7+
{% highlight html %}
8+
<div id="pagination"></div>
9+
10+
<!-- If you haven't called it before -->
11+
<script src="{{ site.socket_url }}"></script>
12+
13+
<!-- Then -->
14+
<script>
15+
socket('{{ site.socket_key }}', {
16+
router_mode: 'history',
17+
element: '#pagination',
18+
pagination: 5
19+
});
20+
</script>
21+
{% endhighlight %}
22+
23+
<div id="pagination"></div>
24+
<script>
25+
socket('{{ site.socket_key }}', {
26+
router_mode: 'history',
27+
element: '#pagination',
28+
pagination: 5
29+
});
30+
</script>

0 commit comments

Comments
 (0)