回答編集履歴
3
補足の追加。
test
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
こんな感じでしょうか。
|
1
|
+
こんな感じでしょうか。
|
2
|
+
|
3
|
+
**追記:**テストしました。さっきのは動かない・・・ ので修正して[サンプル](https://jsfiddle.net/a1v5ey6p/)で動作を確認出来ます。
|
2
4
|
|
3
5
|
|
4
6
|
|
@@ -46,6 +48,12 @@
|
|
46
48
|
|
47
49
|
```**動くサンプル:**[https://jsfiddle.net/a1v5ey6p/](https://jsfiddle.net/a1v5ey6p/)
|
48
50
|
|
51
|
+
|
52
|
+
|
53
|
+
---
|
54
|
+
|
55
|
+
|
56
|
+
|
49
57
|
【jQueryでa番目からb番目まで範囲指定セレクタ - Web学び】
|
50
58
|
|
51
59
|
[http://fukuyama.co/ltgt](http://fukuyama.co/ltgt)
|
2
ミスがあったため修正。
test
CHANGED
@@ -8,11 +8,11 @@
|
|
8
8
|
|
9
9
|
jQuery( '.more' ).on( 'click', function() {
|
10
10
|
|
11
|
-
|
11
|
+
jQuery( '.show_box_hide:lt(3)').removeClass( 'show_box_hide' ).slideDown( 'fast' );
|
12
12
|
|
13
|
-
|
13
|
+
if ( jQuery( '.show_box.show_box_hide' ).length === 0 ) { jQuery( '.more' ).hide(); }
|
14
14
|
|
15
|
-
} );
|
15
|
+
} );
|
16
16
|
|
17
17
|
```
|
18
18
|
|
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
<?php endif; ?>
|
46
46
|
|
47
|
-
```
|
47
|
+
```**動くサンプル:**[https://jsfiddle.net/a1v5ey6p/](https://jsfiddle.net/a1v5ey6p/)
|
48
48
|
|
49
49
|
【jQueryでa番目からb番目まで範囲指定セレクタ - Web学び】
|
50
50
|
|
1
ミスがあったため修正。
test
CHANGED
@@ -8,9 +8,9 @@
|
|
8
8
|
|
9
9
|
jQuery( '.more' ).on( 'click', function() {
|
10
10
|
|
11
|
-
jQuery( '.
|
11
|
+
jQuery( '.show_box.show_box_hide:gt(2)').removeClass( 'show_box_hide' ).slideDown( 'fast' );
|
12
12
|
|
13
|
-
if ( jQuery( '.
|
13
|
+
if ( jQuery( '.show_box.show_box_hide' ).length === 0 ) { jQuery( '.more' ).hide(); }
|
14
14
|
|
15
15
|
} ); // 未テスト
|
16
16
|
|