If not, an alert is displayed and focus is moved to the checkbox.Not the prettiest solution, but functional in all browsers with Java Script enabled.The advantage for the user is that it's obvious whick element is causing the problem and there's no alert window that needs to be clicked away.
We know the checkbox is changing because that's what drives the CSS effect: The HTML for this example is the same as above. I'm not much of a developer, but stubble on your website searching for exactly what you posted here.
Did you find any of these examples useful or have any questions? However, I noticed that your script is throwing errors and thought maybe i'd check with you to see if you might know why. I'm getting : Uncaught Syntax Error: Unexpected token ...
and then about 4 of these: Uncaught Type Error: Cannot read property 'add Event Listener' of null(…) Anyways, just thought I'd see if you knew why.
Anyways, may just switch over to a wp plugin, but thought I'd try to sharpen up my development skills a little lol Cheers!
In our example, we have a login form with two input fields i.e.