title: Table sort on page load
body: <p>i cant understand why this code dont work on my server. I tested it on some code playgrounds with no problems...</p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;link href="design.css" rel="stylesheet" type="text/css" /&gt;
      &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript"&gt;
  var mylist = $('#myTable');
  var listitems = mylist.find('tr');
  listitems.sort(function(a, b) {
     return $(a).text().toUpperCase().localeCompare($(b).text().toUpperCase());
  })
  $.each(listitems, function(idx, itm) { mylist.append(itm); });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;table id="myTable"&gt;
  &lt;tr&gt;
  &lt;td&gt;B&lt;/td&gt;
  &lt;td&gt;12/01/2016&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;A&lt;/td&gt;
  &lt;td&gt;12/01/2016&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>