Anchors going to wrong position – solution found
-
There’s still a problem that almost all the webpages of my website have a Table of contents with some anchor links that directly bring to the specific paragraph in the text.
When Lazy load plugin is enabled, clicking anchors on any page with any browser bring the page to the wrong position (often about 100px further than the correct point); disabling the plugin everything works correctly.
That’s because images before loading are not the same size like after load so that bring to a wrong position.A possible solution:
The problem could be solved very easy. Read out the height of every image and expand a space holder image with 1px x 1px to the needed height at the same psotion.
Example:
1. Lazy load finds an image.
2. read out height of the image. example: 300px
2. Lazy load replaces the image with an image (1x1px, 100% transparent) and scales it to the same height of 300px.This way the list keeps it′s height and you can use ancors without problem.
Would be nice if you could build something like this in your next version.If you integrate this to the plugin you would be the only one with a solution. All lazy load plugins have this problem.
The page I need help with: [log in to see the link]
- The topic ‘Anchors going to wrong position – solution found’ is closed to new replies.