title: If checkbox is checked add class to it's label
body: <p>i am trying to add class to checkbox label if checkbox is already checked.
  i am doing this with jQuery each function but it adds class to all checkboxes label when i refresh the page.</p>
  
  <pre><code>$('label.checkbox').each(function() {
  if ($('.checkbox input[type="checkbox"]').is(':checked')) {
      $('label.checkbox').addClass('checked');
  }
  });
  </code></pre>
  
  <p>HTML</p>
  
  <pre><code>    &lt;label class="checkbox"&gt;
          &lt;span&gt;Title&lt;/span&gt;
          &lt;input type="checkbox" checked="checked" name="" /&gt;
      &lt;/label&gt;
  </code></pre>