I am attempting to display my div once the button is clicked. Below is the code snippet:
<div class="post-menu">
<button class="button">
<i class="uil uil-ellipsis-h"></i>
</button>
<div id="menu-lists" class="menu-lists">
<div><a href=""><i class="uil uil-edit-alt"></i> Edit</a></div>
<div><a href=""><i class="uil uil-trash"></i> Delete</a></div>
</div>
</div>
div.post-menu div.menu-lists {
/* display: none; */
position: absolute;
width: 140px;
right: 0;
background-color: #ffffff7f;
backdrop-filter: blur(8px);
border-radius: 20px;
margin: 10px 5px;
z-index: 99;
overflow: hidden;
padding: 0 20px;
height: 0;
}
.activePostMenu {
padding: 20px;
height: 124px;
}
$("button.button").click(function(){
$(".menu-lists").toggleClass("activePostMenu");
});
The web console does not show any errors, so I am having trouble identifying the issue. (The placement of the div is correct within its parent element before being hidden)