Used in Angular.js - checks current value of $location.hash() and scroll to related element, according to rules specified in Html5 spec. It also watches the $location.hash() and scrolls whenever it changes to match any anchor.
Questions tagged [anchor-scroll]
129 questions
116
votes
8 answers
AngularJS - $anchorScroll smooth/duration
Reading the AngularJS docs I haven't figured out if $anchorScroll can have a duration/easing option to smooth scroll to elements.
It only says:
$location.hash('bottom');
// call $anchorScroll()
$anchorScroll();
I do not use jquery and don't want…

itsme
- 48,972
- 96
- 224
- 345
46
votes
9 answers
Angular4 - Scrolling to anchor
I am trying to do a simple scroll to an anchor element on the same page. Basically, the person clicks on a "Try It" button and it scrolls to an area lower on the page with the id "login". Right now, it is working with a basic id="login" &

lnamba
- 1,681
- 3
- 18
- 26
23
votes
6 answers
Scroll to anchor after page load in Angular
I need to set an ng-click event so that that it loads a new page, and then, once the page has loaded, scrolls to an anchor point on the page. I've tried every solution proposed on this SO post but I can't get it to work correctly.
Most of those…

Daniel Bonnell
- 4,817
- 9
- 48
- 88
17
votes
1 answer
How to setup and use the yOffset property of $anchorScroll in AngularJS
I use the $anchorScroll-service in AngularJS. It works fine. But I have a fixed navigation bar at the top and the scrolling location goes always x-pixels to far.
Now in the $anchorScroll documentation there is a property called yOffset. According to…

DanEEStar
- 6,140
- 6
- 37
- 52
11
votes
2 answers
Auto-Scroll to next anchor at Mouse-wheel
I have 5 anchors on my html page. Is there any way that the page scrolls automatically to the next anchor (#) by a single Mouse-wheel scroll? Is there a way that it happens regardless of the anchor's name? just to the next anchor.

Bondsmith
- 1,343
- 3
- 13
- 27
10
votes
4 answers
react-scroll | How to scroll to a specific targeted component when clicking on Navbar Link
I am making a single scroller page using React and want to navigate to a specific section of the page. In HTML we use an href and anchor tag to achieve this interaction.
I found a React library called react-scroll but I do not know how to link each…

Kinan Alamdar
- 437
- 1
- 6
- 22
9
votes
3 answers
Remove Link on scroll
In my application I have 4 links with different IDs and 4 DIV with same ID as each link (I use them for anchor-jumping).
My current code:
One

Rubioli
- 685
- 6
- 34
8
votes
1 answer
AngularJS is putting forward slash / after hash tag
I'm trying to use AngularJS $anchorScroll with $location.hash. However, when I set the hash, AngularJS adds a forward slash, / after it.
For example, the url is: http://localhost:13060/Dashboard. When I don't include the AngularJS library, I can…

jth_92
- 1,120
- 9
- 23
7
votes
2 answers
Ionic anchorscroll not working on iOS
I'm using $anchorscroll in my ionic application, on Android it works fine but on iOS my content gets stuck after scrolling, I can't scroll up anymore.
I tried using overflow-scroll="true", but this doesn't work either in my application...
Can…

Warri
- 217
- 1
- 3
- 14
6
votes
1 answer
Navigate to a fragment of a **different** (not the same) page/component in Angular
On click of a link, I would like to navigate to a fragment of a different page/component. I have not been able to achieve this even though trying multiple things:
Link:
View
The destination…

MPP
- 65
- 1
- 7
6
votes
3 answers
scroll to id element when using "?" in url, vue.js
I have this url http://localhost:8080/?london and it needs to load to the id of london in .- which is on the page.
I cannot use http://localhost:8080/#london, even though that will work!
To make things more complicated I am…

artworkjpm
- 1,255
- 2
- 19
- 40
6
votes
2 answers
Smooth Scrolling anchor with offset (jquery)
Im using the following code to add smooth scrolling for anchors on my site.
Because i have a sticky header id like to offset this by say 200px
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') ==…

PahPow
- 203
- 2
- 3
- 8
5
votes
2 answers
Anchor-like functionality in Vaadin to jump/scroll to a certain point
Is there a way in vaadin to scroll or jump to a certain point (e.g. a Label) inside a view (e.g. a Panel)when a button or link component is clicked? Similar to the anchors functionality on a website?
I'm using Vaadin 7.5.9
EDIT:
I have a…

st.huber
- 1,481
- 2
- 24
- 45
4
votes
3 answers
Anchor points in HTML
I'm fairly basic when it comes to coding websites, but I wanted to incorporate anchor points in to my horizontal scrolling website. I've had a go but it isn't working.
Below is the code I've tried - I'm not sure if it's something to do with my…

Nathan Wilson
- 169
- 4
- 18
4
votes
1 answer
Navigate to a specified position on a dynamic Angular 2 page
If I have scrolled down on a page where multiple elements have been generated on *ngFor, clicking on an element brings me to a different page via the router.
When I click on a button to get back to the previous page, I would like the screen to be…

j-meiring
- 71
- 4