Revolution Slider Scroll-to-Bottom Anchor Offset Issue

Hi,

My website is running the latest version of X. The Scroll to Bottom anchor enabled on the single-page site works, but it has an incorrect offset. When clicked, you are taken to the bottom to the next section, but it is a number of pixels too far, resulting in the fixed header/navbar overlapping the next section’s title.

The Revolution Slider is a fullscreen slider set to be shown Below the Masthead in the page’s settings. The anchor is enabled there too. The slider’s settings has fullscreen offset to the .masthead class. .x-masthead does not offset it.

I can’t seem to figure out what is causing the offset, or how to fix it. Any help would be appreciated. Thanks.

Hi,

Upon checking, I can see you have custom js that is directly affecting the scroll bttom anchor

Can you try removing it from Cornerstone > JS

Thanks

Oh wow, I can’t believe I didn’t notice that. Thanks for pointing it out.

With the custom JS removed, it now works on Chrome, but only from the second time it is pressed (and onwards). The first click still has an offset. But on Firefox, it works from even the first click. What the…? I made sure to flush the site cache and then hard reload the site on both browsers, yet this is the result.

Please verify that you are experiencing the same behavior from your browsers, and provide any further ideas for solving it fully.

Hi @ParamountPainting,

That code is actually from me, have you copied it from other threads? As I don’t see any other threads from your account. That code was a quick workaround for scroll-bottom with a static header, and your site has fixed header.

Instead, what you need is this code.

jQuery ( document ).ready ( function($) {

$(document).on('click', '.x-slider-scroll-bottom', function(e) {


$('html, body').stop().animate( { scrollTop: $('.x-main').offset().top - $('.x-navbar').height() } );


} );

} );

Please add that :slight_smile:

Thanks!

1 Like

That worked, thank you! It’s resolved! :smiley:

Yes, I did get the other from your post on a previous thread I found lol. I was experimenting to try to figure it out on my own (before reaching out for support) but I guess I forgot I had it there.

Thanks again. This can be closed.

You’re most welcome and glad we could help :wink:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.