Skip to content

Commit fc57fd2

Browse files
author
cferdinandi
committed
Updated readme
1 parent 25e9b11 commit fc57fd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ Smooth Scroll is built with modern JavaScript APIs, and uses progressive enhance
221221
- If the `<body>` element has been assigned a height of `100%`, Smooth Scroll is unable to properly calculate page distances and will not scroll to the right location. The `<body>` element can have a fixed, non-percentage based height (ex. `500px`), or a height of `auto`.
222222
- SmoothScroll looks for a `hash` on the `href` of the link. As a result passing in an empty hash (`#`) will not work and will jump to the top of the page.
223223
- Many browsers will treat `#top` the same as an empty hash (`#`), resulting in a jump to the top of the page. To animate scrolling to the top of the page, please use a different ID.
224+
- To prevent the page from jumping, Smooth Scroll removes the target element's ID, scrolls, and then adds it back. As a result, elements styled using the ID as a selector will momentarily lose their styling. I recommend using classes as selectors instead.
224225

225226

226227

0 commit comments

Comments
 (0)