Home>Support>Using Anchor Links with Hero plugin and Indeterminate Dimensions (i.e. vh)

Using Anchor Links with Hero plugin and Indeterminate Dimensions (i.e. vh)

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.

This is a free community support forum. Replies are not guaranteed. If you need professional email support, please purchase a SiteOrigin Premium license.

  1. 4 months, 5 days ago Alex S Hi, I Work Here

    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.

    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.

    The browser calculates vh and we ensure all slides are the defined height on load before displaying the hero.

  2. 4 months, 5 days ago Ibraheem

    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.

  3. 4 months, 4 days ago Alex S Hi, I Work Here

    Hi Ibraheem,

    Please navigate to WP AdminSettingsPage scroll to id and set a Delay of 250. How does that look?

  4. 4 months, 4 days ago Ibraheem

    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

  5. 3 months, 27 days ago Alex S Hi, I Work Here

    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?

  6. 3 months, 27 days ago Private Message - Alex S Hi, I Work Here

    This is a private message.

  7. 3 months, 27 days ago Private Message - WordPress

    This is a private message.

  8. 3 months, 27 days ago Ibraheem

    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.

  9. 3 months, 27 days ago Ibraheem

    Hi Alex,

    I reset the password as per your message.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More