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 8895181
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:42:30+00:00 2026-06-14T23:42:30+00:00

Sorry just got an update, the tr class A and B are repeating a

  • 0

Sorry just got an update, the tr class A and B are repeating a lot. I want to combine each AB into C and show all the Cs.

I got a table like this:

<table class="table">
<tbody>
<tr class="A">
<td>11111</td>
<td>22222</td>
<td>33333</td>    
</tr>
<tr class="B">
<td>44444</td>
<td>55555</td>
<td>66666</td>    
</tr>
<tr class="A">
<td>77777</td>
<td>88888</td>
<td>99999</td>    
</tr>
<tr class="B">
<td>10101</td>
<td>11111</td>
<td>22222</td>    
</tr>
</tbody>
</table>

What I want to do is some jQuery to combine the two tr together like:

<table class="table">
<tbody>
<tr class="C">
<td>11111</td>
<td>22222</td>
<td>33333</td>    
<td>44444</td>
<td>55555</td>
<td>66666</td>    
</tr>
<tr class="C">
<td>77777</td>
<td>88888</td>
<td>99999</td>    
<td>10101</td>
<td>11111</td>
<td>22222</td>    
</tr>
</tbody>
</table>
  • 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-06-14T23:42:31+00:00Added an answer on June 14, 2026 at 11:42 pm

    Here is a working example: http://jsfiddle.net/65XaF/

    $(document).ready(function() {
        var a = $('.A');
        var b = $('.B');
        a
            .append(b.children())
            .removeClass('A')
            .addClass('C');
        b.remove();
    });​
    

    Note: question was updated to reflect multiple A & B groups after this answer.

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

Sidebar

Related Questions

Sorry for my bad English. Just like what I asked. I have this class
I'm sorry if my question is silly because I just want to ask what
First sorry for posting this here.I just got no answer to this question on
Sorry if its just me who is scratching the head looking at this code,
sorry for the stupid questions but there are just some things about WCF I
Sorry if this is dumb but I was just thinking I should give a
Sorry. I'm just bitten (or bit. Go figure with this left-to-right language :-) I've
Sorry for my inpatience but after weeks staying up late and just having put
Just some background, sorry so long winded. I'm using the System.Data.SQLite ADO.net adapter to
Sorry if the question is somehow too easy. I just wonder on how to

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.