JSFiddle - React, Tailwind, and code Playground
by beech
HTML
<div class="supportus-button-container"> <a href="#" id="supportus-button-1" class="supportus-button">MAKE A DONATION</a>
<br>
<br>
<br>
</div>
<div class="supportus-box-1">
From the New World
<br>
<br>
</div>
CSS
.supportus-button-container {
padding-left: 6.5%;
padding-top: 30px;
}
.supportus-button {
text-decoration:none;
text-align:center;
position: relative;
width: 100%;
display: block;
padding:70px 0px;
border:none;
font:1em;
font-weight:bold;
color:#ffffff !important;
background:#e29a25;
-webkit-transition: all 0.16s linear;
-moz-transition: all 0.16s linear;
-o-transition: all 0.16s linear;
transition: all 0.16s linear;
}
.supportus-button:hover {
background:#827b72;
}
.supportus-button:active {
background:#827b72;
}
.supportus-button:after {
top: 100%;
left: 50%;
border: solid transparent;
content:" ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
border-top-color: #827b72;
border-width: 20px;
margin-left: -20px;
-webkit-transition: all 0.16s linear;
-moz-transition: all 0.16s linear;
-o-transition: all 0.16s linear;
transition: all 0.16s linear;
}
.supportus-button:hover:after {
border-top-color: #827b72;
}
#supportus-button-1.clicked {
background:#827b72;
}
.supportus-box-1 {
/*border: solid #e29b25;*/
background-color: rgbA(59, 59, 59, 0.5);
width: 100%;
height: 190px;
display: none;
color: white;
}
JavaScript
$("#supportus-button-1").click(function () {
$(".supportus-box-1").toggle();
});
$("#supportus-button-1").click(function () {
$(".supportus-button:after").toggle();
});
$("#supportus-button-1").click(function () {
$(this).toggleClass("clicked");
});