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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T05:22:52+00:00 2026-06-11T05:22:52+00:00

I have an HTML table with a fixed header. The code I used for

  • 0

I have an HTML table with a fixed header. The code I used for the fixed header I found on Stack Overflow and I have the link in the code.

NOTE: I found one other thread similar to this one posted 4 months ago and it never got a response–the poster also didn’t post any working JSfiddle, so I figure that warranted the posting of this separate thread.

The issue I’m having is trying to prepend a row to the HTML table using jquery.

$("#MaterialTable").find("tbody").prepend(function() {

The code worked just fine until I added the fixed header. Now I don’t know how to address this issue. The link to the fiddle is below. You can see that the row is added to the table but it’s outside of the scrollable portion.

JSFiddle: Adding a row to an HTML table with a fixed header

I don’t post questions on here often, so please let me know if I’ve missed some obvious needed information.

  • 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-11T05:22:53+00:00Added an answer on June 11, 2026 at 5:22 am

    The “scrollify” code duplicates the original table… incuding its ID. Therefore you end up with two elements with the same ID.

    Immedately after the line var newTbl = oTbl.clone();, add this: newTbl.attr("id","");

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

Sidebar

Related Questions

see fiddle i have html table and one textbox and one button.make cell selection
I have an html table with one of the headers spanning over 2 columns.
I have a page with a fixed header and below that a table that
I have the following HTML. <body> <div class=header></div> <div class=navdiv></div> <div class=mainarea> <p></p> <table>
How do I create an HTML table with fixed header that works in mobile
I have an html table (Not Gridview) and that has no proper Header and
I have a HTML code as follows; <div>Content table with varying height</div> <div id=buttons>
OK, I am stumped. I have an HTML table that is within a fixed
I have a html table that always shows its header columns, when the user
I am experimenting with a fixed header table (I have seen many plugins online

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.