I have successfully implemented the code to open/close a div when clicking a specific button. Now, I am looking to enhance this functionality by changing the appearance of the button from a down arrow to an up arrow when toggling the div.
This is my first post, so please forgive any mistakes in my explanation.
The image dimensions are set to height = 60px and width = 30px, with the up arrow on one half and the down arrow on the other half.
<style>
.content_toggle {
background: url(toggle-btn.png);
background-color: rgba(0, 0, 0, 0.9);
position: absolute;
cursor: pointer;
bottom: 62px;
left: 850px;
height: 30px;
width: 30px;
}
</style>
<body>
<div class="content_toggle" style="display: block;"></div>
<script>
$("div.content_toggle").click(function () {
$("div.content").slideToggle("slow");
});
</script>
<div class="content">content, content, content</div>
</body>