回答編集履歴
1
test
CHANGED
@@ -1,35 +1,16 @@
|
|
1
1
|
history.pushStateを使いましょう。
|
2
|
-
|
3
|
-
|
4
2
|
|
5
3
|
JSのリンクをソートとページングの為に設定しましょう。
|
6
4
|
|
7
|
-
|
8
|
-
|
9
5
|
コード例を以下に示します。
|
10
6
|
|
11
|
-
|
12
|
-
|
13
|
-
```lang-<ここに言語を入力>
|
14
|
-
|
15
7
|
if (history && history.pushState) {
|
16
|
-
|
17
|
-
|
8
|
+
$('.tableClass th a, .paginationBar .controles a').on('click', function () {
|
18
|
-
|
19
|
-
|
9
|
+
$.getScript(this.href);
|
20
|
-
|
21
|
-
|
10
|
+
history.pushState(null, document.title, this.href);
|
22
|
-
|
23
|
-
|
11
|
+
return false;
|
24
|
-
|
25
|
-
|
12
|
+
})
|
26
|
-
|
27
|
-
|
13
|
+
$(window).bind("popstate", function () {
|
28
|
-
|
29
|
-
|
14
|
+
$.getScript(location.href);
|
30
|
-
|
31
|
-
|
15
|
+
});
|
32
|
-
|
33
16
|
}
|
34
|
-
|
35
|
-
```
|