Hey I have what seems to be a simple problem, but having some trouble. I want to only display an alert message once when I hit the X of my hamburger toggle menu. Any help is appreciated.
Here is the code I have in my codepen that I am referencing: https://codepen.io/toshvelaga/pen/wLJYKL
I have tried using the code below, but I get the alert message twice and also when clicking on the hamburger instead of just ONLY the X.
$(document).ready(function(){
$('#nav-icon3').click(function(){
$(this).toggleClass('open');
$('#nav-icon3.open').click(function() {
alert("hello");
});
});
});