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

  • Home
  • SEARCH
  • 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 9117585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:55:48+00:00 2026-06-17T04:55:48+00:00

This HTML markup is fixed and can not be modified directly: <table> <tbody> <tr>

  • 0

This HTML markup is fixed and can not be modified directly:

<table>
    <tbody>
        <tr>
            <td id="LeftPanel">A</td>
            <td>B</td>
            <td>C</td>
        </tr>
    </tbody>
</table>

I’m trying to use jQuery to change the markup to this:

<table>
    <tbody>
        <tr>
            <td id="LeftPanel">A</td>
            <td>C</td>
            <td id="RightPanel">D</td>
        </tr>
    </tbody>
</table>
  1. The TD directly after #LeftPanel needs to be removed (B).
  2. A new TD with the id #RightPanel needs to be added to the end of the table (D).

Note that the full source has many tables on the same level so the only reference point to work with is td#LeftPanel. The A B C D is just there for reference and can’t be used as part of the script (the full source has a lot of HTML in each TD, including nested tables).

How can I accomplish this?

  • 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-17T04:55:50+00:00Added an answer on June 17, 2026 at 4:55 am

    http://api.jquery.com/category/traversing/

    $('#LeftPanel')
            .next()
            .remove()
            .end()
            .parent()
            .append('<td id="rightPanel">D</td>');
    

    http://jsfiddle.net/msKvR/

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

Sidebar

Related Questions

I'm trying to change DatePicker's HTML markup in Apache Wicket. What I have for
Suppose I have this html markup: <div id=wrapper> <pre class=highlight> $(function(){ // hide all
I have a string contaning some html markup, like this: var html = <div>
let's say I have this set of HTML-markup and CSS #CSS .inputhelp_text { background:
I have html markup like this <button id=button1 onclick=alert='yup'></button> and I want to make
Suppose a HTML markup like this: <ul> <li>List item 1</li> <li>List item 2</li> <li>List
Okay, so I'm designing this site. Here's the HTML markup of this simple element:
Given this markup: // Calendar.html?date=1/2/2003 <script> $(function() { $('.inlinedatepicker').datepicker(); }); </script> ... <div class=inlinedatepicker
This is my markup: <!DOCTYPE HTML> <html> <head> <title>Test title</title> <style type=text/css> * {
I'm parsing JSON that is contained in an HTML element. Consider this markup: <div

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.