2

I am using a JavaScript plugin (pivottable.js) to create pivot tables to display large data on a django site. I want to add a fixed/sticky table head that stays at the top of my div while I scroll down.

Due to the creation of the tables in the JavaScript I cannot easily select the pivot table headers.

Does anyone know of anyway they have accomplished this in the past? A large percentage of my users use IE so it is critical it works on that as well.

lealceldeiro
  • 14,342
  • 6
  • 49
  • 80
M. Salzman
  • 23
  • 6
  • I am using pivottable.js.org/examples to create my pivot table, due to how the table is created in the javascript theres no element that i can select that will embody the whole header therefore I have no way to select the data. If anyone has any solutions for this that would help a lot – M. Salzman Jul 19 '17 at 12:12
  • Did you finally find a reliable solution to this?? I'm on my way of doing this. If I get to any solution I'll share it with you as soon as I can. Related [issue here](https://github.com/nicolaskruchten/pivottable/issues/485) – lealceldeiro Feb 28 '18 at 17:03

1 Answers1

0

floatThead is what you need to look at http://mkoryak.github.io/floatThead/

According to its website:

jquery.floatThead is a floating/locked/sticky/fixed table header plugin that requires no special CSS and supports window and overflow scrolling.

Rushikumar
  • 1,774
  • 5
  • 18
  • 28
  • I am using https://pivottable.js.org/examples/ to create my pivot table, due to how the table is created theres no element that i can select that will embody the whole header therefore I have no way to select the data. – M. Salzman Jul 17 '17 at 18:58
  • Using 'floatThead' makes problems for the columns width. the width from the tbody is being different from thead. – jacob spitzer Nov 23 '20 at 01:23