smartscroll icon indicating copy to clipboard operation
smartscroll copied to clipboard

Add navigation

Open visualcookie opened this issue 9 years ago • 3 comments

Hi,

would like to see this in this plugin. A navigation that refers to the right hashes and the links should get an is-active status when they hit the section.

Here's a snippet of my last implementation of it (no active status is added when the section is hit at the moment):

   /// Navigation Scroll
   /////////////////////////////////////////////////////////////
   var _navHeaderLink = $('.nav-main_item-link');

   _navHeaderLink.each(function(i, elm) {
      var _link = $(elm);

      _link.click(function(e) {
         e.preventDefault();

         var _linkHash = $(this).data('hash-jump');

         // Scroll to the section
         $('html, body').animate({
            scrollTop: $(_linkHash).offset().top
         }, 600, 'easeInQuart')
      })
   });

visualcookie avatar Jun 10 '15 06:06 visualcookie

+1 I'm exactly trying to do the same. Would be cool to have it as a built-in functionality

julianxhokaxhiu avatar Aug 15 '15 17:08 julianxhokaxhiu

+1 for this feature. Navigation that scrolls to that section is a common use-case.

momendo avatar Aug 11 '16 16:08 momendo

+1

karneaud avatar Oct 18 '16 12:10 karneaud