title: How to check "checkbox" dynamically - jQuery Mobile
body: <p>With HTML a checkbox is created like this:</p>
  
  <pre><code>&lt;form&gt;
     &lt;input type="checkbox" id="category1"&gt;Category1&lt;br&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>With javascript we can check the checkbox like this:</p>
  
  <pre><code>$("#category1")[0].checked = true
  </code></pre>
  
  <p>Now I am trying to create the same page with jquery-mobile. The checkbox looks like this:</p>
  
  <pre><code>&lt;form&gt;
      &lt;label&gt;
          &lt;input name="checkbox-0 " type="checkbox"&gt;Check me
      &lt;/label&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Why is there is no <code>id</code> here? Is the name the <code>id</code>? Should I delete the attribute name and create one with the name <code>id</code>?</p>
  
  <p>How can I check this checkbox here with Javascript/jQuery? </p>
  
  <p>I tried the code above, but it doesn't seem to work for this checkbox.</p>