title: How to make a checkbox without a form
body: <p>I have been trying to make a simple app with 3 fields like this:</p>
  
  <pre><code>    &lt;div id = "nameInput" &gt;Name:&lt;/div&gt;&lt;input id = "nameInputField" type = "text" name = "userName" /&gt;
      &lt;div id = "emailInput" &gt;Email:&lt;/div&gt;&lt;input id = "emailInputField" type = "text" name = "email" /&gt;
      &lt;input id = "termsCheck" type = "checkbox" name = "terms" /&gt;
  </code></pre>
  
  <p>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. </p>
  
  <p>Here is the JS for the checkbox as well. It is always marked as unchecked:</p>
  
  <pre><code>if ($('#terms').checked == true) {
      //Rest of code
  </code></pre>
  
  <p>Is there a way to make this without using a form or is there a reason that my checkbox is never registered as checked?</p>