teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

jsonデータを追記

2017/07/26 07:59

投稿

helloman
helloman

スコア39

title CHANGED
File without changes
body CHANGED
@@ -17,6 +17,71 @@
17
17
  これを10件づつページ分割(ページネーション)する方法を探しています。
18
18
  配列から作成した一覧をページ分割する方法が見つけれませんでした。
19
19
 
20
+ ```json
21
+ [
22
+ {
23
+ "title": "\u30bf\u30a4\u30c8\u30eb0"
24
+ },
25
+ {
26
+ "title": "\u30bf\u30a4\u30c8\u30eb1"
27
+ },
28
+ {
29
+ "title": "\u30bf\u30a4\u30c8\u30eb2"
30
+ },
31
+ {
32
+ "title": "\u30bf\u30a4\u30c8\u30eb3"
33
+ },
34
+ {
35
+ "title": "\u30bf\u30a4\u30c8\u30eb4"
36
+ },
37
+ {
38
+ "title": "\u30bf\u30a4\u30c8\u30eb5"
39
+ },
40
+ {
41
+ "title": "\u30bf\u30a4\u30c8\u30eb6"
42
+ },
43
+ {
44
+ "title": "\u30bf\u30a4\u30c8\u30eb7"
45
+ },
46
+ {
47
+ "title": "\u30bf\u30a4\u30c8\u30eb8"
48
+ },
49
+ {
50
+ "title": "\u30bf\u30a4\u30c8\u30eb9"
51
+ },
52
+ {
53
+ "title": "\u30bf\u30a4\u30c8\u30eb10"
54
+ },
55
+ {
56
+ "title": "\u30bf\u30a4\u30c8\u30eb11"
57
+ },
58
+ {
59
+ "title": "\u30bf\u30a4\u30c8\u30eb12"
60
+ },
61
+ {
62
+ "title": "\u30bf\u30a4\u30c8\u30eb13"
63
+ },
64
+ {
65
+ "title": "\u30bf\u30a4\u30c8\u30eb14"
66
+ },
67
+ {
68
+ "title": "\u30bf\u30a4\u30c8\u30eb15"
69
+ },
70
+ {
71
+ "title": "\u30bf\u30a4\u30c8\u30eb16"
72
+ },
73
+ {
74
+ "title": "\u30bf\u30a4\u30c8\u30eb17"
75
+ },
76
+ {
77
+ "title": "\u30bf\u30a4\u30c8\u30eb18"
78
+ },
79
+ {
80
+ "title": "\u30bf\u30a4\u30c8\u30eb19"
81
+ }
82
+ ]
83
+ ```
84
+
20
85
  最終目標はjsonデータから一覧を作成し、
21
86
  [Masonry](https://masonry.desandro.com/)のプラグインを使ってinfinity scroll出来るまでが目標です。
22
87
 

1

誤字修正

2017/07/26 07:59

投稿

helloman
helloman

スコア39

title CHANGED
File without changes
body CHANGED
@@ -8,7 +8,7 @@
8
8
  success: function (data) {
9
9
  var output = '';
10
10
  for (var i = 0; i < data.length; i++) {
11
- output+= '<h3>'+data[i].post_title+'</h3>';
11
+ output+= '<h3>'+data[i].title+'</h3>';
12
12
  }
13
13
  $('#output').append(output);
14
14
  }