javascripthtmlajaxscrolljquery-scrollable

Ajax changes scroll position


I have a short question for you. Could anybody help me figure out why after an Ajax request, the page scroll is changing back to the top? I think it's about JQuery. I can't find too much info on the web, so I ask for your help. This is the test page where I'm doing that. Try changing and see what is happening. Thank you so much!

www.*.ca/test/script.php

Got the answear. Thank's


Solution

  • Because the page momentarily becomes shorter, so the scrolling position cannot remain where it was or else the page would be scrolled past its contents.