0

I have this website in which I have a menu and onclick on the item I go to the section with that id.

My menu items are:

  • Home
  • Biography
  • Curriculum Vitae
  • Gallery
  • Video
  • Press
  • News
  • Contact

and my javascript is

$scope.scrollTo = function(id) {
    $location.hash(id);
    console.log($location.hash());
    $anchorScroll.yOffset = 50;
    $anchorScroll();
};

but how can I do if I'd like to see the "scrolling effect" while I go to the section? I mean, if I'm in the homepage and I click on Video, I would like to see my page scroll through "Biography", "CV" and "Gallery".

1

1 Answer 1

0

You could add jQuery and use it to animate scrolling.

For example:

jQuery('html, body').animate({scrollTop: 0}, 200);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.