JSFiddle - React, Tailwind, and code Playground
HTML
<!-- toggle BEGIN -->
<div class="toggle">
<div class="arrow-up">
<script type="text/javascript">
$(document).ready(function () {
$("div.arrow-up").click(function() {
var self = $(this); //cache jQuery object
$("div.content").slideToggle("slow");
if (self.hasClass("arrow-up")) {
self.removeClass("arrow-up").addClass("arrow-down");
} else {
self.removeClass("arrow-down").addClass("arrow-up");
}
});
});
</script>
</div>
</div>
<!-- toggle END --> <!-- content BEGIN -->
<div id="faq" class="content">
<h1 class="page-heading">FAQ</h1>
<div id="q-and-a">
<p>
<span class="question">Q: Is this a joke?</span>
<br />
A: No. This is a 100% legit project.
</p>
<p>
<span class="question">Q: Why should I purchase a pixel(s) from you?</span>
<br />
A: To help support the cause/non-profit organization revealed in the background photo.
</p>
<p>
<span class="question">Q: If I purchase a pixel from you do I own a part of your website?</span>
<br />
A: No. You silly human-being.
</p>
<p>
<span class="question">Q: Why is their a grid on your website background?</span>
<br />
A: Because each time 100 pixels are sold I will fill in a block of the grid until the background is completely...
CSS
.toggle { background-color: #0a1614; opacity: .90; position: absolute; cursor: pointer; bottom: 0; margin-left: 709px; height: 80px; width: 25px; display: block; }
.arrow-up { background-image: url(../images/toggle-btn.png); background-repeat: no-repeat; background-position: 0 0; width: 25px; height: 53px; margin-top: 12px; }
.arrow-down { background-image: url(../images/toggle-btn.png); background-repeat: no-repeat; background-position: 0 -53px; width: 25px; height: 53px; margin-top: 12px; }