Wednesday, 3 October 2018

Jquery tablesorter issue with table rowspan

I applied jquery tablesorter to my table, without rowspan its working fine but when I'm adding rowspan to my table sorting just destroying my table.

$(".tablesorter").tablesorter({
});    

<table cellspacing="1" class="tablesorter">
            <thead>
                    <tr>
                        <th>First Name</th>
                        <th>Age</th>
                        <th>Country</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Peter</td>
                        <td>28</td>
                        <td rowspan="2" style="vertical-align:middle">AAA</td>
                    </tr>
                    <tr>
                        <td>John</td>
                        <td>33</td>
                    </tr>
                    <tr>
                        <td>Clark</td>
                        <td>18</td>
                        <td>BBB</td>
                    </tr>

                    <tr>
                        <td>Bruce</td>
                        <td>22</td>
                        <td>CCC</td>
                    </tr>
                </tbody>
            </table>

without clicking sort my table look like

enter image description here

When I click on country header table just destroying its style.

enter image description here



from Jquery tablesorter issue with table rowspan

No comments:

Post a Comment