I am developing a small page that is necessary to fix the header of a table, when the user scrolls, the header is still there. I wrote a small piece of code, a sample of my page, in jsfiddle and it isn’t working and I don’t know why. What am I doing wrong?
You can see what I have done so far here.
Follow this example
Ok, it took some time to understand what you need. The thing you want to do is called “floating table header”. I have tried all possible jQuery scripts that do that. I have had issues with all of them, but one. If you are simply looking for this feature and there is no sentimental value of your fiddle-code. Then use Floating header plugin. It is the most advance floating header plugin. Check the demo.
Live demo based on your fiddle, by adding Floating header plugin:
http://jsfiddle.net/2AKMh/16/