質問編集履歴
1
「.hoge2」削除dlを対象
title
CHANGED
File without changes
|
body
CHANGED
@@ -4,24 +4,24 @@
|
|
4
4
|
|
5
5
|
```lang-html
|
6
6
|
<div class="hoge" style="display:block">
|
7
|
-
<dl class="hoge2" style="display:none;"></dl>
|
8
|
-
<dl
|
7
|
+
<dl style="display:none;"></dl>
|
8
|
+
<dl></dl>
|
9
|
-
<dl
|
9
|
+
<dl style="display:none;"></dl>
|
10
10
|
<div class="hoge3" style="display:none;"></div>
|
11
11
|
</div>
|
12
12
|
```
|
13
|
-
上記構成で、「hoge」内が「style="display:block"」かつ「
|
13
|
+
上記構成で、「hoge」内が「style="display:block"」かつ「dl」の要素が全て「style="display:none"」の時のみ「hoge3」を「 style="display:block;"」に切り替えたいです。
|
14
14
|
```lang-html
|
15
15
|
<div class="hoge" style="display:block">
|
16
|
-
<dl
|
16
|
+
<dl style="display:none;"></dl>
|
17
|
-
<dl
|
17
|
+
<dl style="display:none;"></dl>
|
18
|
-
<dl
|
18
|
+
<dl style="display:none;"></dl>
|
19
19
|
<div class="hoge3" style="display:block;"></div>
|
20
20
|
</div>
|
21
21
|
```
|
22
22
|
|
23
23
|
※ご注意点
|
24
24
|
・「hoge」要素は同一ページ内に複数あるため、各組ごとに処理したいです。
|
25
|
-
・「
|
25
|
+
・「dl」のstyle属性は別のナビゲーションにより動的に切り替わるため、読み込み時の1回のみの処理ではありません。
|
26
26
|
|
27
27
|
以上を踏まえた上で、ご教授の程よろしくお願いします。
|