Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #152832

    Robert B
    Participant

    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.

    anchor error

    #153041

    Christopher
    Moderator

    Thanks 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.

    #154889

    Robert B
    Participant
    This reply has been marked as private.
    #155144

    Christian
    Moderator

    Hey 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. 🙂

    #155365

    Robert B
    Participant

    Awesome! Thank you!

    #155548

    Christian
    Moderator

    You’re welcome Robert.

    #160546

    Robert B
    Participant

    That 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.

    #160548

    Robert B
    Participant
    This reply has been marked as private.
    #160770

    Nabeel A
    Moderator

    Hi 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.

    #161297

    Robert B
    Participant

    I 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-Corporate

    #161611

    Christian
    Moderator

    Hey 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.