List of things I tried
- .removeClass and addClass
- show() and hide();
- changing the css
To begin: Yes, I do have onLoad in the beginning of my script, and all of the other components work perfectly. Yes, I have tried Googling, and nothing fixes the problem. This is not a dublicate.
$("button").click(function(){
$("block").addClass("hidden"); //class hidden is display: none
$("block").removeClass("hidden");
}
This is my code. No, block is not a class or ID, I am gonna use it as an example.
Please help, I do not know what I have done wrong in my code and why this doesn’t work.
By the way, adding the class works, removing it doesn’t.
HTML:
<block>A</block>