File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 2
2
3
3
## Updating url and title
4
4
5
- When users are scrolling through pages we can update the browser url and page title. This allows the current page to be shared or bookmarked.
6
-
5
+ When users are scrolling through pages we can update the browser url and page title. This allows the current page to be shared or bookmarked.
6
+
7
7
We can achieve this by listening for the [ ` page ` ] ( events.md#page ) event. The page event contains the ` url ` and ` title ` of the current page in view.
8
8
9
9
The [ History API] ( https://developer.mozilla.org/en-US/docs/Web/API/History_API ) can be used to update the url.
@@ -19,7 +19,7 @@ ias.on('page', (event) => {
19
19
});
20
20
```
21
21
22
- [ View this behaviour in a live demo] ( https://v3. infiniteajaxscroll.com/examples/articles/ )
22
+ [ View this behaviour in a live demo] ( https://infiniteajaxscroll.com/examples/articles/ )
23
23
24
24
## Loading previous pages
25
25
Original file line number Diff line number Diff line change @@ -28,4 +28,4 @@ ias.on('last', function() {
28
28
})
29
29
```
30
30
31
- [ View this behaviour in a live demo] ( https://v3. infiniteajaxscroll.com/examples/articles/ )
31
+ [ View this behaviour in a live demo] ( https://infiniteajaxscroll.com/examples/articles/ )
Original file line number Diff line number Diff line change @@ -147,4 +147,4 @@ ias.on('page', (event) => {
147
147
})
148
148
```
149
149
150
- [ View this behaviour in a live demo] ( https://v3. infiniteajaxscroll.com/examples/articles/ )
150
+ [ View this behaviour in a live demo] ( https://infiniteajaxscroll.com/examples/articles/ )
You can’t perform that action at this time.
0 commit comments