質問編集履歴
2
知りたいことを書いていなかった
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,8 @@
|
|
1
1
|
jQueryのaddClassでクリックしたときに、クラスをつけたいのですが、現在は、下のコードのように今は同じようなjQueryのコードを2つ用意するといった効率の悪いコードの書き方をしています。
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
変数やfor文などでもっと効率のいい方法を探しています
|
2
6
|
|
3
7
|
|
4
8
|
|
1
コード変更
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,13 +30,13 @@
|
|
30
30
|
|
31
31
|
<div>
|
32
32
|
|
33
|
-
<label class="
|
33
|
+
<label class="schoolclass"><input type="radio" name="schoolclass" value="1" required>1組</label>
|
34
34
|
|
35
|
-
<label class="
|
35
|
+
<label class="schoolclass"><input type="radio" name="schoolclass" value="2" required>2組</label>
|
36
36
|
|
37
|
-
<label class="
|
37
|
+
<label class="schoolclass"><input type="radio" name="schoolclass" value="3" required>3組</label>
|
38
38
|
|
39
|
-
<label class="
|
39
|
+
<label class="schoolclass"><input type="radio" name="schoolclass" value="4" required>4組(</label>
|
40
40
|
|
41
41
|
</div>
|
42
42
|
|