回答編集履歴
1
追記
test
CHANGED
@@ -31,3 +31,25 @@
|
|
31
31
|
}
|
32
32
|
|
33
33
|
```
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
1回きりなら、引数追加して
|
40
|
+
|
41
|
+
```HTML
|
42
|
+
|
43
|
+
<i class="fab fa-twitter" onclick="fontawesomeChange( this, 'fa-twitter', 'fa-twitter-square' )"></i>
|
44
|
+
|
45
|
+
```
|
46
|
+
|
47
|
+
```JavaScript
|
48
|
+
|
49
|
+
function fontawesomeChange( element, oldClassName, changeClassName ) {
|
50
|
+
|
51
|
+
element.classList.replace( oldClassName, changeClassName );
|
52
|
+
|
53
|
+
}
|
54
|
+
|
55
|
+
```
|