Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1193823
    wlacasse
    Participant

    For my site: http://fitcitytrack.com/,

    I’d like the #Top anchor to scroll smoothly like the Download or Contact menu items. I would have probably used the topmost section instead, but I’d prefer it if it went to the top of the slider; any way to do this?

    Thank you

    #1193923
    Paul R
    Moderator

    Hi,

    You can add this under Custom > Edit Global Javascript in the Customizer.

    
      jQuery(document).ready(function($) {
    
        var scrollTopAnchor      = $('.x-navbar .desktop .x-nav > li > a[href="#Top"]');
      
        scrollTopAnchor.click(function(){
          $('html,body').animate({ scrollTop: 0 }, 850, 'easeInOutExpo');
          return false;
        });
      });
    

    Hope that helps.

    #1197227
    wlacasse
    Participant

    Perfect, thanks

    #1197411
    Joao
    Moderator

    Glad to hear it,

    Joao

  • <script> jQuery(function($){ $("#no-reply-1193823 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>