I’ve got this piece of code and it’s working perfectly, however I don’t understand anything besides the click events.
Will anyone be so kind as to give me a breakdown of what is going on in this fiddle?
Updated: https://jsfiddle.net/mslilafowler/y35a87bw/7/ (I commented before each line, explaining how I understand the code. I also commented what I didn’t understand)
I realise that by checking the boxes, the button is enabled, and by unchecking the boxes, the button is disabled. That’s what I want it to do. But how would I have known how to create this function simply with the knowledge gained from reference manuals and tutorials?
P.S. I didn’t write the code myself. I’ve just compiled various snippets from StackOverflow answers and combined them to make this code.