It been a long day, I suspect that is contributing to this seemingly simple issue.
I have a burger menu that, I need to toggle the #url
on, it needs to toggle between:
Open = #open
Close = #close
My jquery
code looks like this:
$('.menu').click(function () {
$(this).attr("href","#close");
});
and my html
looks like this:
<a href="#open" class="menu">
<b></b>
<b></b>
<b></b>
<span>Menu</span>
</a>
I can open the menu fine, I can close it too, however, once I have closed the menu I can't then open it again since the href
is still showing as #close
. So, I wondered how I can toggle it so whatever the url
, the href
is the opposite?
I Appreciate any help.