title: Sorting options elements alphabetically using jQuery
body: <p>I'm trying to understand sorting <code>option</code> elements within a <code>select</code> element alphabetically. Ideally, I'd like to have this as a separate function where I can just pass in the select element since it needs to be sorted when the user clicks some buttons.</p>
  
  <p>I've searched high and low for a good way of doing this, but haven't been able to find anything that worked for me.</p>
  
  <p>The option elements should be sorted alphabetically by text, not value.</p>
  
  <p>Is this possible in some way?</p>