I recently created a toggle bar using HTML/CSS and I attempted to implement JavaScript code to close it. However, despite my efforts, the script doesn't seem to be functioning properly.
Code:
$(document).ready(function(){
$(".fa-times").click(function(){$(".sidebar_menu").addClass("hide_menu");
$(".toggle_menu").addClass("opacity_one");});
The issue arises with the "x" button that closes the sidebar. Since it's a custom font, it isn't displaying properly on jsfiddle. The button should be located in the top-right corner of the purple bar.
I believe this information provides enough context and the code is straightforward. While I'm still learning HTML/CSS/JS, I need to complete this task for a Microsoft project as no one else on my team can even create a basic HTML page.
P.S. Please disregard the white element with random text.