Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6154355
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:14:57+00:00 2026-05-23T20:14:57+00:00

I need to display rows which are having a1 in first row and a2

  • 0

I need to display rows which are having a1 in first row and a2 in second row etc..
below is my HTML code

 <table>
  <tr>
    <td>
         <table>
                <tr class="a4"><td>4</td></tr>
                <tr class="a6"><td>6</td></tr>
                <tr class="a2"><td>2</td></tr>
                <tr class="a5"><td>5</td></tr>
                <tr class="a3"><td>3</td></tr>
         </table>
    </td>
            <td>
         <table>
                <tr class="a4"><td>4</td></tr>
                <tr class="a6"><td>6</td></tr>
                <tr class="a1"><td>1</td></tr>
                <tr class="a2"><td>2</td></tr>
                <tr class="a5"><td>5</td></tr>
                <tr class="a3"><td>3</td></tr>
         </table>
    </td>
            <td>
         <table>
                <tr class="a4"><td>4</td></tr>
                <tr class="a6"><td>6</td></tr>
                <tr class="a1"><td>1</td></tr>
                <tr class="a2"><td>2</td></tr>
                <tr class="a5"><td>5</td></tr>
                <tr class="a3"><td>3</td></tr>
         </table>
    </td>
            <td>
         <table>
                <tr class="a4"><td>4</td></tr>
                <tr class="a6"><td>6</td></tr>
                <tr class="a1"><td>1</td></tr>
                <tr class="a2"><td>2</td></tr>
                <tr class="a5"><td>5</td></tr>
                <tr class="a3"><td>3</td></tr>
         </table>
    </td>
            <td>
         <table>
                <tr class="a4"><td>4</td></tr>
                <tr class="a6"><td>6</td></tr>
                <tr class="a1"><td>1</td></tr>
                <tr class="a2"><td>2</td></tr>
                <tr class="a5"><td>5</td></tr>
                <tr class="a3"><td>3</td></tr>
         </table>
    </td>
            <td>
         <table>
                <tr class="a4"><td>4</td></tr>
                <tr class="a6"><td>6</td></tr>
                <tr class="a1"><td>1</td></tr>
                <tr class="a2"><td>2</td></tr>
                <tr class="a5"><td>5</td></tr>
                <tr class="a3"><td>3</td></tr>
         </table>
    </td>
            <td>
         <table>
                <tr class="a4"><td>4</td></tr>
                <tr class="a6"><td>6</td></tr>
                <tr class="a1"><td>1</td></tr>
                <tr class="a2"><td>2</td></tr>
                <tr class="a5"><td>5</td></tr>
                <tr class="a3"><td>3</td></tr>
         </table>
    </td>
            <td>
         <table>
                <tr class="a4"><td>4</td></tr>
                <tr class="a6"><td>6</td></tr>
                <tr class="a1"><td>1</td></tr>
                <tr class="a2"><td>2</td></tr>
                <tr class="a5"><td>5</td></tr>
                <tr class="a3"><td>3</td></tr>
         </table>
    </td>
</tr>
</table>   

Please someone help me How can i achieve it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T20:14:57+00:00Added an answer on May 23, 2026 at 8:14 pm

    You need to use sort plugin presented here: http://james.padolsey.com/javascript/sorting-elements-with-jquery/

    you need to give your main table an ID and sort your trs like this:

    $(function()
      {
          $('#mainTable table').each(sortTrs);
      });
    
    function sortTrs(index, parent)
    {
        $(parent).find("tr").sortElements(function(a, b){
                return $(a).attr("class") > $(b).attr("class") ? 1 : -1;
            });
    }
    

    see what I tried and worked in jsFiddle: http://jsfiddle.net/y9mrF/7/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table with various rows that display data, in each row I
I'm creating a the first row of a table to display header text that
I need to display 3 rows from which a user can pick values by
I have 1000 rows of data but need to only display 100 rows at
Suppose a query select * from employee returns 80 rows. I need to display
I need to display a string which has a white space on a asp.net
Assume I have these tables, from which i need to display search results in
I have a master-detail page, in which I use GridView to display multiple rows
I have this code which gives me the below output in firebug, so according
I have an HTML table which is styled using CSS. The table is composed

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.