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

    Ayoub e
    Participant

    Hi,

    I use one page navigation, but unfortunately the smooth scrolling doesn’t work. Instead of smooth scrolling, the site just ‘jumps’ to the content bar. I tried several things according to your solutions for other users:

    – disable/enable other third parties plugins
    – right settings for one page navigation
    – right notation #-content-band-1

    Can you help me finding the solution?

    http://www.gouti.nl
    wp version 3.9
    x theme version 1.8.1
    x shortcodes version 2.0.7

    Thank you!

    Anne

    #41861

    Rad
    Moderator

    Hi Ayoub,

    Upgrading your x theme and its plugins should fix the problem. As of now, I can see javascript errors which from your old copy of x-shortcode plugins.

    Could you try upgrading? And this section should help you, http://theme.co/x/member/kb/updating-your-theme-and-plugins/

    Thank you.

    #41882

    Happy Cow
    Participant

    same problem for me too. it doesn’t scroll. it just jumps right to it. i’ve updated the theme and all plugins. still same. also, it’s a little off when it jumps. it always jumps about 40 px to low, cutting off the top of each section heading. i’m not using a full page slider.

    #42242

    Rad
    Moderator

    Hi Shaun,

    Could you provide a url address?

    Thank you.

    #42273

    Happy Cow
    Participant

    this plugin fixes the scroll issue. http://wordpress.org/plugins/wp-localscroll/

    #42612

    Rubin
    Keymaster

    Hi Shaun,

    glad that this fixed the problem but still the scrolling should work fine without any other plugins so if you want that we take a look we would need the site address. 🙂

    #44483

    Happy Cow
    Participant

    hey! sorry. so yes, the plugin fixed the smooth scroll, but it still stops about 50 pixels too low cutting off the top of each section. even before installing the plugin, it would stop at the wrong place, just without the smooth scroll.

    url: happycowstudios.com

    still working on it. so far just the services, and the sub items of services are linked to home page section ids. click “services” or any of the sub items of “services” to see what i mean about it stopping about 50 pixels too low.

    thanks so much for the help!

    cheers!
    shaun

    #44789

    Alexander
    Keymaster

    Hi Shaun,

    This plugin introduces it’s own code, so I’m afraid it’s not something we can support. Have you reviewed our One Page Navigation guide? X can do this without a plugin.

    Are you using a fixed navbar? X uses the navbar height to help offset the scroll location, this could explain why it’s not landing right on the element.

    #44840

    Happy Cow
    Participant

    Yes, I have reviewed the one page navigation info. I can deactivate the plugin, but it goes back to jumping straight to the content instead of scrolling smoothly like it should. Do you want me to deactivate it so you can troubleshoot?

    I’m using the fixed top menu. I just changed it over to the static top and it worked fine. It stopped at the right spot. So how would I use it with the fixed menu? I’m not interested in using the static version. Is there a work-around to get it to stop at the right spot and still use the fixed menu?

    Thanks for the help!

    Shaun

    #45061

    Ayoub e
    Participant
    This reply has been marked as private.
    #45294

    Rad
    Moderator

    Hi Shaun,

    You menu links were setup like : https://happycowstudios.com/#about

    Could you try not using full path, instead just #about ?

    Also, to make it scroll before the container, it is much better if you will use your content band’s ID like #x-content-band-1, #x-content-band-2, #x-content-band-3

    And for sub menu, to enable scrolling. You can add this code at your customizer’s custom javascript.

    jQuery(function($){
        
        $('.sub-menu a').click(function(e){
          
          var hash = $(this).attr('href').split("#").slice(-1)[0];
          if( hash ) {
                e.preventDefault();
              $('html,body').animate({ scrollTop: $('#' + hash ).offset().top - $('.x-navbar').height()},700 ,'swing');
          }
    
        });
    
    });
    #45297

    Rad
    Moderator

    Hi Ayoub, It’s fixed now. Cheers!

    #45333

    Happy Cow
    Participant

    Great! Thanks for the help! I’m able to deactivate the plugin now. It’s now scrolling smoothly like it should. It also stops at the correct place now. Thanks!

    The only problem I have now is when a visitor navigates away from my home page and clicks a menu item or a sub item that links to an anchor back on my home page, it does nothing. Even if I use the full url path for a sub item, it does nothing. If I use the full url for a main menu item, it goes back to my home page, but i lose the smooth scroll function and it goes back to stopping at the wrong place (about 50 pixels too low).

    How do I fix this issue? I need site visitors to be able to come back to my homepage and smooth scroll to the correct section if they’re not already on the page.

    Thanks so much!

    Cheers!
    Shaun

    #45533

    Christian
    Moderator

    Hey Shaun,

    We’re sorry but pages linking to a section of One Page Navigation is not currently possible. Technically, it is possible but it is quite involved so it’ll fall beyond our scope of support. Moreover, the One Page Navigation feature wasn’t intended for that purpose (for external pages to link to a section of a page with One Page Navigation enabled) but for a landing page (external page link directly to the page).

    Thank you for understanding.

    #45669

    Happy Cow
    Participant

    I understand. Thanks for the help. One more thing… is it possible to use a different menu on different pages? The idea would be to have one menu on the homepage that is setup for smooth scrolling on a single page. But if the visitor leaves the homepage, can it be setup to have that page use a different menu than the one on the homepage?

    Thanks!
    Shaun