I have a Hamburger menu that activates slide-push menu and animates the SVG in to a "close" button. This javascript adds the .active class when clicked. If I click somewhere else rather than "close" icon, it doesn't animate it self back. How do I revers the function that will work if I click anywhere else?
<script type="text/javascript">
document.querySelector(".svg-menu-toggle").addEventListener("click", function () {
this.classList.toggle("active");
});
</script>