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

回答編集履歴

2

修正。

2016/02/05 02:06

投稿

yamato_hikawa
yamato_hikawa

スコア2092

answer CHANGED
@@ -6,7 +6,6 @@
6
6
  http://masonry.desandro.com/methods.html#reloaditems
7
7
 
8
8
  ```JavaScript
9
- ```JavaScript
10
9
  var deferred = ajaxPagingLoaderReady(options, loaderEl, 'auto', state, self, resultKey);
11
10
  var masonry;
12
11
 

1

コードを修正

2016/02/05 02:06

投稿

yamato_hikawa
yamato_hikawa

スコア2092

answer CHANGED
@@ -6,16 +6,24 @@
6
6
  http://masonry.desandro.com/methods.html#reloaditems
7
7
 
8
8
  ```JavaScript
9
+ ```JavaScript
10
+ var deferred = ajaxPagingLoaderReady(options, loaderEl, 'auto', state, self, resultKey);
11
+ var masonry;
12
+
13
+ deferred.done(function() {
14
+ var renderMasonry = function() {
9
- var renderMasonry = new Masonry('.unitList', {
15
+ masonry = new Masonry('.unitList', {
10
- columnWidth: 360,
16
+ columnWidth: 360,
11
- isFitWidth: true,
17
+ isFitWidth: true,
12
- itemSelector: '.unit',
18
+ itemSelector: '.unit',
13
- gutter: 20,
19
+ gutter: 20,
14
- isAnimatedFromBottom: true
20
+ isAnimatedFromBottom: true
21
+ });
22
+ };
23
+
24
+ renderMasonry();
25
+ }).fail(function() {
26
+ console.log('fail');
15
27
  });
16
-
17
- var deferred = ajaxPagingLoaderReady(options, loaderEl, 'auto', state, self, resultKey);
18
- deferred.done(function() {
19
- renderMasonry.reloadItems();
20
- }
28
+ ```
21
29
  ```