I have been trying to make a simple app with 3 fields like this:
<div id = "nameInput" >Name:</div><input id = "nameInputField" type = "text" name = "userName" />
<div id = "emailInput" >Email:</div><input id = "emailInputField" type = "text" name = "email" />
<input id = "termsCheck" type = "checkbox" name = "terms" />
The problem I am having is that I keep needing to try to wrap it in a form to get the checkbox to register as checked when it is. I DO NOT want to use a form because I don't ever want to submit anything.
Here is the JS for the checkbox as well. It is always marked as unchecked:
if ($('#terms').checked == true) {
//Rest of code
Is there a way to make this without using a form or is there a reason that my checkbox is never registered as checked?