When I click on the event listener (#bar) the console.log fires but the .addClass() doesn't. I looked through some threads on the topic but found nothing that helped.
$("#bar").on('click', function(event) {
console.log("click")
$("#bar").addClass("bar-open");
});
#bar {
overflow-y: clip;
height: 48px;
transition: height 1s;
position: absolute;
z-index: 1005;
background-color: rgb(248, 249, 250);
border: 1px solid rgb(222, 226, 230);
border-radius: 5px;
}
.bar-open {
height: 365px !important;
}
.hidden-section {
padding-top: 100px;
}
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<div id="bar">
<div>
<div>
<span> This a reveal button </span>
</div>
</div>
<div class="hidden-section">
<div>
This is a bunch of hidden content
</div>
</div>
</div>