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 8717605

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T06:20:21+00:00 2026-06-13T06:20:21+00:00

I have a table like this: <div id=evttbldiv> <table id=eventtbl> <tr class=headers> <th>Evento</th> <th>Artista(s)</th>

  • 0

I have a table like this:

<div id="evttbldiv">
      <table id="eventtbl">
          <tr class="headers">
            <th>Evento</th>
            <th>Artista(s)</th>
            <th>Local</th>
            <th>Data</th>
            <th></th>
          </tr>
        <tr class="rowdata">
          <td class="lfm_event"></td>
          <td class="lfm_artists"></td>
          <td class="lfm_venue"></td>
          <td class="lfm_date"></td>
          <td><div class="arrow"></div></td>
        </tr>
        <tr class="rowinfo">
            <td colspan="5">
              hello
            </td>
        </tr>
      </table>
    </div>

My JQuery:

container = $('#evttbldiv').html();
    console.log(container);
    $('.headers', container).remove();
    console.log(container);

What I’d like to do is remove the header row and place the rest (everything in between <tr class="rowdata"> and the last trin the container variable. However, it’s not removing the headers in my JQuery, even with that line of code.

console.log(container) is displaying the same output in both instances.

  • 0 0 Answers
  • 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-13T06:20:23+00:00Added an answer on June 13, 2026 at 6:20 am

    The problem is that you’re trying to use jQuery to affect the DOM of the item after you’ve converted it to HTML. Instead, clone() it, remove() the .header, and then convert it to HTML:

    container = $('#evttbldiv').clone();
    $('.headers', container).remove();
    console.log(container);
    
    // And if you need the HTML...
    container_html = container.html();
    console.log(container_html);
    

    Fiddle: http://jsfiddle.net/mstauffer/98XMj/1/

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

Sidebar

Related Questions

I have a css table setup like this: <div class='table'> <div> <span>name</span> <span>details</span> </div>
I have a javascript string contains html table like this: <div class=nobrtable><table class=at><TBODY><TR><td> FY
I have a table like this: <table id=tbl> <tr><th>My Table</th></tr> <tr><td><div class=arrow></div></td></tr> <tr><td>The second
I have a table like this; <table class=std-table> <tbody><tr> <td>DATA</td><td>DATA</td> </tr> <tr class=selected-trial> <td>DATA</td><td>DATA</td>
I have a div block like this: <div id=myDiv> <table> <tbody> <tr>Some data</tr> </tbody>
A newbie question,really. Suppose I have a html table like this: <div id=div1> <table
I have a table like this below. And there is a div container with
I have a table like this: <table cellpadding=0 cellspacing=0 border=0 > <tr > <div
i have a gridview table like this... <div> <asp:GridView ID=GridView1 runat=server AllowSorting=true OnSorting=TaskGridView_Sorting >
I have a step definition cucumber like this find(div#cycle_form table).should have_content(append_row_to_table_tag(day_num, hour, hour_night)) Method

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.