I have the following jsFiddle which has a .tab class (on a span) that is supposed to remove/replace the open (or close) class on the .container onclick — and although my console logs are showing that successfully, using closest() I’m not able to grab the specific class in question to change/toggle that class.
I’ve tried quite a few variations, but am not sure if I am selecting this wrong.
Any pointers would be greatly appreciated. Thanks!
.closest actually works it’s way outwards so a better option would be