jquery tablesorter usage without tbody and th block

I am very much interested to know how to use jquery tablesorter without tbody and th block, the reason behind this is I have many tables and css working which I generated from http://www.csstablegenerator.com/ site, in which only tr and td blocks only used

This is working table with tbody block Working default table style fiddle

But I want to sort table with only tr and td blocks Expected Fiddle

This is my test table which I want to sort

   <table border='1' id='test' >

    <!-- this is my header -->   

               <td>abc 123</td>
               <td>abc 1</td>
               <td>abc 9</td>
               <td>zyx 24</td>



Assuming you don't want to manually deal with the HTML of the table, so I would get jquery to do it for you:

var header = $("#test tr:first").html();
$("#test tr:first").remove();
$("#test").prepend('<thead>' + header + '</thead>');

Need Your Help

Centralize session management to other Springboot applications

java session spring-boot spring-session session-management

I have some applications with Spring Boot, Spring Security, Spring Sessions and Spring Redis.

make conditionally including other makefiles

bash include makefile conditional

I want to conditionally include makefiles depending on the contents of a xml file and product.