回答編集履歴

2

説明追記

2016/03/29 05:18

投稿

tkturbo
tkturbo

スコア5572

test CHANGED
@@ -39,3 +39,5 @@
39
39
  var nth = '4n+' + (new_i + 1); // <=
40
40
 
41
41
  ```
42
+
43
+ 。。。おそらくスライド4枚なのに3の倍数で処理しようとしていたのが問題だったのかなぁ。

1

ソースの欠落分を追加

2016/03/29 05:18

投稿

tkturbo
tkturbo

スコア5572

test CHANGED
@@ -24,10 +24,18 @@
24
24
 
25
25
  ```
26
26
 
27
+ onSliderLoad:function(currentIndex){
28
+
29
+ $('.slide').removeClass('active');
30
+
31
+ $('.slide_body > div:nth-child(4n+1)').addClass('active'); // <=
32
+
33
+ },
34
+
27
35
  onSlideBefore: function($slideElement, oldIndex, newIndex){
28
36
 
29
- var new_i = newIndex%4;
37
+ var new_i = newIndex%4; // <=
30
38
 
31
- var nth = '4n+' + (new_i + 1);
39
+ var nth = '4n+' + (new_i + 1); // <=
32
40
 
33
41
  ```