4

hello I've used this http://www.benlesh.com/2013/02/angular-js-scrolling-to-element-by-id.html to scroll to elements, but is there a way to set the offset of the anchorScroll? like if I want to center the element in the middle of the view?

popo joe
  • 910
  • 1
  • 9
  • 24

2 Answers2

0

Scroll position after scrolling to the anchorScroll offset - (Window height)/2

sylvhama
  • 251
  • 1
  • 4
  • 13
0

You can have an offset position, down to the top.

$anchorScroll.yOffset = 300;

Marius
  • 1
  • 1