質問編集履歴
1
追加情報
test
CHANGED
File without changes
|
test
CHANGED
@@ -55,3 +55,37 @@
|
|
55
55
|
tabBar_animation();
|
56
56
|
|
57
57
|
```
|
58
|
+
|
59
|
+
|
60
|
+
|
61
|
+
### 追記情報
|
62
|
+
|
63
|
+
```JavaScript
|
64
|
+
|
65
|
+
function tabBar_animation(){
|
66
|
+
|
67
|
+
var tabBar = document.querySelectorAll('#top-tabmenu-list li');
|
68
|
+
|
69
|
+
for (var i = 0; i < tabBar.length; i++){
|
70
|
+
|
71
|
+
tabBar[i].addEventListener("click", function(){
|
72
|
+
|
73
|
+
var tabLink = document.querySelectorAll('.tab_link').length;
|
74
|
+
|
75
|
+
this.classList.toggle('tab_link');
|
76
|
+
|
77
|
+
if ( tabLink > 1 ){
|
78
|
+
|
79
|
+
this.classList.remove('tab_link');
|
80
|
+
|
81
|
+
}
|
82
|
+
|
83
|
+
});
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
}
|
88
|
+
|
89
|
+
tabBar_animation();
|
90
|
+
|
91
|
+
```
|