title: Check if checkbox is checked with jQuery
body: <p>How can I check if a checkbox in a checkbox array is checked using the id of the checkbox array?</p>
  
  <p>I am using the following code, but it always returns the count of checked checkboxes regardless of id.</p>
  
  <pre class="lang-js prettyprint-override"><code>function isCheckedById(id) {
      alert(id);
      var checked = $("input[@id=" + id + "]:checked").length;
      alert(checked);
  
      if (checked == 0) {
          return false;
      } else {
          return true;
      }
  }
  </code></pre>