I would like that whenever you click on a checkbox, a value is printed to the console that corresponds to the state of the checkbox (on/off). I know there are threads with similar titles but all those I’ve seen don’t have clear examples.
Here’s what I got so far
(Turn on Console and click Add library, JQuery1.8.3):
This only prints when the page is loaded, I want it to print whenever I click on it.
This snippet toggles an on and off value whenever I click on the checkbox, but the box doesn’t display the tick symbol anymore when it is toggled on.
Listen to the change event.