Scroll bar keeps jumping to top2/12/2023 ![]() Using plain DOM techniques, this effect could be accomplished by creating the new content, measuring its height ( scrollHeight), and then scrolling the parent container / viewport in the opposite direction that amount. ![]() The only real trick is partially due to using KnockoutJS (KO). Click the buttons to add content above and below, and see that new content does not affect the position of the existing content in the viewport: I setup a small test case to try this out using jsfiddle. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |