Toggle Font-Awesome Icon funktioniert nur bedingt Lösung 2
<i onclick="myFunction(this)" class="fa fa-thumbs-up"></i><script>function myFunction(x) {x.classList.toggle("fa-thumbs-down");}</script>
Dann hier klicken
Der hier verwendete Code
<html>
<head>
<script src="/js_webseite/jquery.js"></script>
<style>
i{
width:100px;
height:100px;
display:block;
border:1px solid red;
margin:0 auto;
overflow:hidden;
}
i.fa-thumbs-down:before{
display:block;
height:100px;
width:100px;
line-height:80px;
font-size:34px;
background:green;
color:white;
content:'HOCH';
}
.fa-thumbs-up:before{
display:block;
height:100px;
width:100px;
font-size:33px;
line-height:80px;
content:'Runter';
background:blue;
color:white;
}
h2{
text-align:center;