Sorting table rows based on column class names using jquery
问题 Very similair to this question: Sort table rows based on their Class Names Consider the following table: <table> <thead> <th>A column</th> </thead> <tbody> <tr> <td class="x">A</td> </tr> <tr> <td class="c">B</td> </tr> <tr> <td class="">C</td> </tr> </tbody> </table> I would like to sort rows based on the first (in this case only) column class name. Some td don't have a class specified. So the desired effect would be: A-B-C -> C-B-A or B-A-C (I don't care where the classless tds are placed).