Hello,
I am using X. We have a few pages that relies on anchor points, the issue is that the top anchor goes underneath the sticky header.
Is there anyway to work around this?
Regards
Ronald.
Hello,
I am using X. We have a few pages that relies on anchor points, the issue is that the top anchor goes underneath the sticky header.
Is there anyway to work around this?
Regards
Ronald.
Hi,
To fix it, you can add this in Cornerstone > JS
jQuery(function($) {
$('a[href^="#"] ').on('touchstart click', function(e) {
e.preventDefault();
var aid = $(this).attr('href').substr(1);
var aTag = $("a[name='"+ aid +"']");
var target_el = aTag.offset().top - $('.x-navbar').outerHeight();
$('html,body').animate({scrollTop: target_el },'slow');
});
});
Hope that helps.
Hi @paul.r
Thank you so much, it works perfectly. 
Even added a smooth scrolling effect, much more than I hoped for, thanks again!!
You are most welcome. 
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.