-
AuthorPosts
-
November 25, 2014 at 5:40 pm #152832
STACK: Integrity
When I click an anchor within a page it scrolls down to the content correctly but the header content “x-navbar” covers over the top of the page. I can provide a link and login once an admin responds. Thank you.
November 26, 2014 at 3:31 am #153041Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL as stated on the forum entrance page. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.
November 29, 2014 at 1:03 am #154889This reply has been marked as private.November 29, 2014 at 8:59 pm #155144Hey Robert,
I’ve added the code below in your Appearance > Customize > Custom > JavaScript for links to scroll smoothly and with an offset of 220px so that you’re internal links lands below the navbar.
jQuery(document).ready(function(){ jQuery('a[href^="#"]').on('click',function (e) { e.preventDefault(); var target = this.hash, jQuerytarget = jQuery(target); jQuery('html, body').stop().animate({ 'scrollTop': jQuerytarget.offset().top-220 }, 900, 'swing', function () { window.location.hash = target; }); }); });
Hope that helps. 🙂
November 30, 2014 at 12:06 pm #155365Awesome! Thank you!
November 30, 2014 at 11:49 pm #155548You’re welcome Robert.
December 8, 2014 at 11:17 am #160546That solution stopped working for some reason.
Is there some other way to get this working? Seems like named anchors (scrolling to sections) would be in the realm of core functionality.
I’ll private over the login credentials again.
Thank you.
December 8, 2014 at 11:18 am #160548This reply has been marked as private.December 8, 2014 at 5:38 pm #160770Hi Robert,
It’s working fine on my end. Can you please check once again after clearing your browser’s cache. If this doesn’t help please provide us with a little more clarification on what it is you’re wanting to do (perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.
December 9, 2014 at 11:47 am #161297I cleared my cache and I’m still having the issue.
The screen shot is above in the first post.
Here’s an example link:
http://dev.michaelgrinder.com/class-list/#Business-and-CorporateDecember 9, 2014 at 11:53 pm #161611Hey Robert,
This works on our end (http://screencast.com/t/eqzkSyLQWMnc). Please clear all the caches and your browser history. If it still doesn’t work on your end, we recommend that you seek assistance from a web developer to investigate why it doesn’t work on your side.
Thanks.
-
AuthorPosts