title: Alphabetical Checkbox input type
body: <p>I currently have a form containing checkboxes, however the text are not in alphabetical order. I have seen many examples for lists, not many for checkbox. <a href="http://jsfiddle.net/fG9qm/" rel="nofollow">http://jsfiddle.net/fG9qm/</a></p>
  
  <pre><code>&lt;form&gt;
      &lt;input type="checkbox" name="vehicle" value="Bike"&gt; Bee
      &lt;input type="checkbox" name="vehicle" value="Car" &gt; Apple
  &lt;/form&gt;
  </code></pre>
  
  <p>I managed to take a snippet of an example, however, if I try to change the value of the input the checkbox moves without the text - how can I solve this?</p>
  
  <pre><code>var $els = $('input');
  
  var $sorted = $($els.toArray().sort(function(a, b) {
      return a.value &gt; b.value;
  }));
  
  $els.each(function(i) {
      $(this).after($sorted.eq(i));
  });
  </code></pre>
  
  <p>Also, is there a way to use to text instead of the value e.g.</p>
  
  <pre><code>return a.input.text &gt; b.input.text
  </code></pre>
  
  <p>Any examples or help will be appreciated - thanks</p>