title: How to get bool value from checkbox in javascript / jquery?
body: <p>I'm trying to see if a checkbox is checked or not with a simple function. It doesn't seem to be working, here's the code: </p>
  
  <p>HTML: </p>
  
  <pre><code>&lt;form&gt;
    &lt;input type="checkbox" id="check" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$(document).ready(function() {
    if ($('#check').is(":checked")) {
      alert('it works')
    }
  });
  </code></pre>
  
  <p>JSFiddle: <a href="https://jsfiddle.net/5h58mx1h/" rel="noreferrer">https://jsfiddle.net/5h58mx1h/</a></p>