Message from JavaScript discussions

November 2020

β€” Tried toggleClass in place of addClass, but still no effect and no error.

The same line of code in another file works fine, so I'm quite at loss.

Message permanent page

β€” 

Now I changed it to "header" in place of "body" and it works, but I need it on body, how come that one gets ignored?

β€” JQuery(document).ready(function () {

jQuery(document).ready(function () {

if(jQuery("#block-darkbgcontrol .dark-bg-control").hasClass("dark-bg") === true) {
jQuery("body").toggleClass("element-dark");
}

});

});

This works. Is it bad practice to repeat jQuery(document).ready() ?

Message permanent page

β€” πŸ˜…

β€” Stop saying.. words lol

β€” Remove the === true

β€” I think i got it, misan statement started a code philosophy party

β€” Same, doesn't work, unless I repeat the document ready.

β€” Ye, the responsibility to enforce the law and make peon obey the rules

β€” Did you put your code in the head or in the body?

β€” Stomping on reviewee neck

β€” Notes, banknotes🀀