+ 1
How to remove added classes from anywhere
I have hada problem recently with classes assume i have an element named button in a variable btn now in a function named controller i add the css class using classlist.add,Now i wanna remove The css class i added in another different function classlist.remove(),If i Do this the css class isnt even being added at the first place but after i remove the classlist.remove The css class i added correctly,How can i remove added css classes from anywhere
3 Réponses
+ 2
In your remove(), specify which class you're removing.
Post your code into Code Playground so we can see it if you're still having issues.
+ 2
yeah i have mentioned it already
+ 2
https://code.sololearn.com/WoC6EMVtgG7i/?ref=app Hey heres the code,I have inserted comments so that U can identify where exactly i have done things,Look for a comment named ///****Questionpart***///Thats where My question relates Thank you!!!!