I am new to coding in WordPress. I am actually making a custom theme where I want a dropdown menu in header.
I like Moz.com and Neilpatel.com’s drop down menu so much. I tried to code one like that with the help of W3 Schools’ clickable drop down tutorial but could not add a closebtn to it on click.
I made a menu that opens on click to 100% width but after the drop down opens, I could not code for changing the drop down menu button into a close button.
Please help me with this. I want to change menu button into close but on on click and again into menu button after it is closed.(ONLY WITH JAASCRIPT NOT JQUERY as I want to keep my blog lightweighted)
Read more here:: Trying to make a dropdown menu with closebtn. please help