Home ยป jQuery tablesorter custom parser example to sort rows by column class name

jQuery tablesorter custom parser example to sort rows by column class name


Today I had a client that asked for me to take my “1” and “0” boolean values that were displayed in table columns and change them to pretty little Font Awesome check icons. Here’s a handy parser that I wrote to sort the rows based on the table column’s classname. I simply added class=”1″ or class=”0″ depending on the boolean values from the database, and the table didn’t break when I tried to sort these by the columns containing the check icons.

 

Leave a Reply

Your email address will not be published. Required fields are marked *