How to close my menu?
Unanswered
WhyFencePost (Ping Reply) posted this in #help-forum
I am unclear on how to make my code close this menu. I have a button, and it needs to remove a class on another object. I also have another button which needs to add that class. I get an error of
How would i do that?
Code is here:
https://pastebin.com/pQ6GLgN5
I need the div wrapping the x in line 20 to be the button, and it needs to change the classes of the div in line 43, and I have no idea how to do that.
Object unable to change parameter of a child or smtn like that.How would i do that?
Code is here:
https://pastebin.com/pQ6GLgN5
I need the div wrapping the x in line 20 to be the button, and it needs to change the classes of the div in line 43, and I have no idea how to do that.
4 Replies
Netherland Dwarf
To change classes it really just dom manipulation
You just need the id or the ref object
And append the tailwind class name
yea, but idk where to put the function in my file and so on, and if there is a special next or react way to do so