Title: Does not
Last modified: August 13, 2017

---

# Does not

 *  [larskorvald](https://wordpress.org/support/users/larskorvlad/)
 * (@larskorvlad)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/does-not/)
 * hi,
 * Trying for hours to get it to work, but it does not 🙁
 * I have made lists, even though I click the link I have made it does not scroll.
   It does not factor in the offset either.
 * If I scroll to the top of the page and click the link again, it scrolls, and 
   the offset works. But it does not seem to be working on the first click. Only
   the second time I click it.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [larskorvald](https://wordpress.org/support/users/larskorvlad/)
 * (@larskorvlad)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/does-not/#post-9406160)
 * Sometimes it works ok, then suddenly it jumps to a whole other place than I want
   it to.
 * Also if I click on the link right after page load it does not seam to be fully
   loaded.
 *  Plugin Author [malihu](https://wordpress.org/support/users/malihu/)
 * (@malihu)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/does-not/#post-9406610)
 * Hi,
 * Can you post your site’s URL so I can check what’s happening? I can’t really 
   help with such issues unless I see your page.
 *  Thread Starter [larskorvald](https://wordpress.org/support/users/larskorvlad/)
 * (@larskorvlad)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/does-not/#post-9409034)
 * hi.
 * Here is a test page: [https://www.trailsofnorway.com/test](https://www.trailsofnorway.com/test)
 * pasword is: test
 *  Plugin Author [malihu](https://wordpress.org/support/users/malihu/)
 * (@malihu)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/does-not/#post-9411666)
 * I just checked the test page with multiple browsers and smooth scrolling, offset
   etc. works for me every time.
 * The issue you’re having is most likely because you’re using a plugin or theme
   that is loading images on-the-fly while the page is scrolling (lazy loading images).
 * When each image is loaded, it changes the documents length **while page is scrolling**.
   This means that the position of targets is also changing while page scrolling
   takes place (e.g. if the targets are placed after an image, this newly loaded
   image will “push” them further down).
 * The problem is that your image placeholders do not have the same height (and 
   probably width) with the actual image that’s going to be loaded.
 * For example in your test page, the image placeholder at the bottom has an initial
   height of 677 pixels but the image loaded has a height of 540 pixels. This means
   that any target below this image will have an “incorrect” scrolling position 
   of 127 pixels. This “incorrect” position will become “correct” after the image
   has loaded, that’s why the 2nd time you click the link it works correctly.
 * Lazy loading images affects all kinds of same-page links (i.e. anchor points).
   Even if you didn’t use “Page scroll to id”, you’d have the same issue. The page
   would “jump” to an id but if you had an image right before it, it would push 
   this id further down after the image was loaded and rendered.
 * The only way to “fix” this is to have image placeholders that have the correct
   dimensions (esp. height) set (the same height as the actual image to be loaded).
   This of course might be complicated to do because the actual image elements are
   affected by certain CSS rules (like `max-width: 100%;`) that modify their height
   when rendered.
 * Hope all the above makes sense and explains what happens.
 *  Thread Starter [larskorvald](https://wordpress.org/support/users/larskorvlad/)
 * (@larskorvlad)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/does-not/#post-9412256)
 * Ah.
 * That makes sense. I will try to disable lazy loading on that page and see if 
   that works.
 * Thanks

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Does not’ is closed to new replies.

 * ![](https://ps.w.org/page-scroll-to-id/assets/icon-256x256.png?rev=1401043)
 * [Page scroll to id](https://wordpress.org/plugins/page-scroll-to-id/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/page-scroll-to-id/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/page-scroll-to-id/)
 * [Active Topics](https://wordpress.org/support/plugin/page-scroll-to-id/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/page-scroll-to-id/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/page-scroll-to-id/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [larskorvald](https://wordpress.org/support/users/larskorvlad/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/does-not/#post-9412256)
 * Status: not resolved