Solved

Sort Jquery (multi sort tbody)

Posted on 2012-04-12
3
534 Views
Last Modified: 2012-06-04
im having some problems need help with organise data in tables.
 using Jquery (tablesorter.) when click to <th> tag, it sorts data in the 1st tbody but then in the 2nd, 3rd, and so on... it does not work

I can't delete (<thead><td>Category</td></thead>) because I want it fixed in position and sort data in tag tr
example:
<table class="tablesorter">
<thead>
<th>name</th>
<th>city</th>
<th>address</th>
</thead>
<tbody>
<thead><td>Category</td></thead>
<tr>
<td>content1</td>
<td>content2</td>
...
</tr>
</tbody>

<tbody>
<thead><td>Category1</td></thead>
<tr>
<td>content1</td>
<td>content2</td>
...
</tr>
</tbody>
<tbody>
<thead><td>Category2</td></thead>
<tr>
<td>subCategory</td>
<td>subCategory</td>
...
</tr>
</tbody>
</table>

Please help me. Thanks
0
Comment
Question by:vt96
  • 2
3 Comments
 
LVL 23

Accepted Solution

by:
basicinstinct earned 500 total points
ID: 37837025
first thing, your html is bad

you can't have nested thead elements inside the tbody elements

for example, you can't have this:

<tbody>
<thead><td>Category</td></thead>
...
</tbody>
0
 

Author Comment

by:vt96
ID: 37840771
Thanks your answer, but i want to sort data subcategory and my category is fixed in the positon. All subCategory (tbody 2nd )will sort below as tbody 1st.
You can preview link:
http://jsfiddle.net/8cg4f/115/
0
 

Author Closing Comment

by:vt96
ID: 38044126
Thanks for your help.  Although I found another solution, if you have additional ideas or third party control, please let me know.
0

Featured Post

New! My Passport Wireless Pro Wi-Fi Mobile Storage

Portable wireless storage to offload, edit, and stream anywhere.

High-capacity, wireless mobile storage designed to accompany professional photographers and videographers in the field to easily offload, edit and stream captured photos and high-definition videos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I made this because I wanted to get e-mail with a attached csv file so I'd would be able to import user input into a MS Excel template, but I also wanted to register/save all inputs from each day in a file on the server. 1st - It creates a temp C…
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now