I have a table with a fixed header and a scrollable body. I want to know the scroll position in the table so that I can refer to it after the postback and set it where the user was before the postback. I would prefer jQuery to do this, but Javascript is fine too. I'm not sure how much code to send here, because I'm not sure if the problem is that I just don't know the code for this, or the code I have (css) interferes with the solutions I tried.
Any ideas where to start? Is there a way that does this? Ive tried to put this (table style = "overflow: auto; height: 150" onclick = "alert (this.scrollTop)") in the table, but it always returns 0.
Ive also tried other jQuery calls. They all return 0.
source share