質問編集履歴
1
概要だけでなく、script なども含めて分かりやすく、詳細に記入しました。
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
|
-
表題の件で、simple paginationjs というのが
|
|
1
|
+
表題の件で、[simple paginationjs ](http://flaviusmatis.github.io/simplePagination.js/)というのがあります。 これを利用して、ページングを各ページに飛ばしたいのですが、国内の一般の例では、同じページ内の飛ばし方です。例:[[面倒なページネーション実装よさらば!](https://codeiq.jp/magazine/2014/02/6155/)] などですが・・・このリンク先で動作が確認できます。
|
|
2
2
|
|
|
3
|
+
では、具体的に、内容は、・・・
|
|
3
|
-
|
|
4
|
+
<link type="text/css" rel="stylesheet" href="simplePagination.css"/>
|
|
4
5
|
|
|
6
|
+
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
|
7
|
+
<script type="text/javascript" src="jquery.simplePagination.js"></script>
|
|
8
|
+
というように最初リンクを張ります。
|
|
9
|
+
|
|
10
|
+
script 部分は、
|
|
11
|
+
<script>
|
|
12
|
+
$(function(){
|
|
13
|
+
$("#paging").pagination({
|
|
14
|
+
items: 4,
|
|
15
|
+
displayedPages: 4,
|
|
16
|
+
cssStyle: 'light-theme',
|
|
17
|
+
prevText: '<<前',
|
|
18
|
+
nextText:'次>>',
|
|
19
|
+
onPageClick: function(pageNumber){show(pageNumber)}
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
function show(pageNumber){
|
|
23
|
+
var page="#page-"+pageNumber;
|
|
24
|
+
$('.selection').hide()
|
|
25
|
+
$(page).show()
|
|
26
|
+
}
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style type="text/css">
|
|
30
|
+
<!--
|
|
31
|
+
.selection {display: none;}
|
|
32
|
+
#page-1 { display: block;}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
-->
|
|
36
|
+
</style>
|
|
37
|
+
これだけで稼動します。
|
|
38
|
+
|
|
39
|
+
href="simplePagination.css"/ と src="jquery.simplePagination.js">というファイルが、download されて、これを利用する分けです。
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
質問点は、以上の内容を利用して、aaaa.html,bbb.html,ccc.html の各ページへ、class 指定とid指定でページング(一般のページングです)出来ないものでしょうか・・・
|
|
43
|
+
|
|
5
|
-
よろしく願います。
|
|
44
|
+
以上です。 よろしく願います。
|