Sticky Table Headers

Koala7 picture Koala7 · Sep 13, 2012 · Viewed 8.9k times · Source

I am using this plugin to achieve a sticky Table Header in my Table. Actually as in the plugin example and in my page, the table Header disappear a bit later the last row in the table. I want my table header disappearing exactly when the last row is gone.There is a chance to achieve that?

Answer

vonflow picture vonflow · Sep 13, 2012

here's a working example: fiddle

all I changed was the end of this line:

if ((scrollTop > offset.top) && (scrollTop < offset.top + $this.height()-base.$clonedHeader.height())) {