Hi,
I’m having an issue with anchor links when using Hero images on a page. I think when using a vh height, the widget calculates the vh through JS and then outputs the CSS inline after the page is loaded. When using anchor links in-page, this works fine (obviously the exact dimensions are known to the browser), but when using anchor links from an external page, it seems that the vh height is calculated and outputted after the browser is loaded and so the anchor links do not work properly.
I’ve tried a number of ways to fix this by attempting to load a scroll script after all the images are loaded (I tried a number of methods including Alex Dickson’s) but couldn’t fix it.
Does anyone know of a way around this?
Thanks in advance.
Hi Ibraheem,
Do you have a public URL where we can take a look at your setup? This will give me a better idea of your overall setup to hopefully provide a solution.
The browser calculates vh and we ensure all slides are the defined height on load before displaying the hero.
Hi Alex,
Thanks for the reply. Yes, the public URL is: http://dev.ikdot.com/.
The two sub-menu links under ‘Giving Back’ are anchor links to in-page ids.
Thank you for offering to look at this.
Hi Ibraheem,
Please navigate to WP AdminSettingsPage scroll to id and set a Delay of 250. How does that look?
Hi Alex,
Same problem I’m afraid! I made a quick GIF to show exactly the problem I am having:
https://www.dropbox.com/s/cg7llqnxkddiwb9/paco_screen_record_anchor_issue.gif?dl=0
Hi Ibraheem,
That’s odd. That should have helped because the problem is that the size of the image is being calculated after Page scroll to id is run.
Would it be possible for you to create a temporary admin account for us so we can log in and take a look at your general settings?
This is a private message.
This is a private message.
Hi Alex,
Thank you, I’ve created the account as with the email and username you asked for.
I’m not sure if the password was sent but I’ve saved it in case you need it. Let me know how and I’ll ping it to you.
Hi Alex,
I reset the password as per your message.