質問編集履歴
1
追加情報
title
CHANGED
File without changes
|
body
CHANGED
@@ -26,4 +26,21 @@
|
|
26
26
|
|
27
27
|
}
|
28
28
|
tabBar_animation();
|
29
|
+
```
|
30
|
+
|
31
|
+
### 追記情報
|
32
|
+
```JavaScript
|
33
|
+
function tabBar_animation(){
|
34
|
+
var tabBar = document.querySelectorAll('#top-tabmenu-list li');
|
35
|
+
for (var i = 0; i < tabBar.length; i++){
|
36
|
+
tabBar[i].addEventListener("click", function(){
|
37
|
+
var tabLink = document.querySelectorAll('.tab_link').length;
|
38
|
+
this.classList.toggle('tab_link');
|
39
|
+
if ( tabLink > 1 ){
|
40
|
+
this.classList.remove('tab_link');
|
41
|
+
}
|
42
|
+
});
|
43
|
+
}
|
44
|
+
}
|
45
|
+
tabBar_animation();
|
29
46
|
```
|