回答編集履歴
1
hasClassを使い、書き直しました。
answer
CHANGED
@@ -1,15 +1,18 @@
|
|
1
1
|
一応動作しましたが、汚くなってしまいました・・・
|
2
2
|
他のベストアンサーを待ちたいです。
|
3
|
+
|
4
|
+
kei344様ありがとうございます。
|
5
|
+
書き直しました。
|
6
|
+
|
3
7
|
```ここに言語を入力
|
4
|
-
|
5
8
|
$('.menu img').mouseover(function() {
|
6
|
-
if( $(this).
|
9
|
+
if( !$(this).parents().hasClass("is_active" ) ) {
|
7
10
|
$(this).attr('src', $(this).attr("src").replace(".png", "_on.png"));
|
8
11
|
}
|
9
12
|
});
|
10
13
|
|
11
14
|
$('.menu img').mouseout(function() {
|
12
|
-
if( $(this).
|
15
|
+
if( !$(this).parents().hasClass("is_active" ) ) {
|
13
16
|
$(this).attr('src', $(this).attr('src').replace('_on.png', '.png'));
|
14
17
|
}
|
15
18
|
});
|