Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9d7db3f

Browse files
Update README.md
1 parent 7542363 commit 9d7db3f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ If we scroll down, the next 8 products are loaded. Also, notice the following:
222222

223223
![Infinite Scroll](images/scroll_html_response.png)
224224

225-
To handle pagination for this site, first of we will load the index page and extract the number of products. We have already observed that 8 products are loaded in one request. Now we can calculate the number of pages as following
225+
To handle pagination for this site, first of we will load the index page and extract the number of products. We have already observed that 8 products are loaded in one request. Now we can calculate the number of pages as follows:
226226

227227
Number of pages = 132/8 =16.5
228228

@@ -253,7 +253,7 @@ for page_numer in range(2, page_count+1):
253253

254254
## Pagination with Load More Button
255255

256-
The way the pagination using a Load More button works is very similar to how infinite scroll works. The only difference is how loading the next page is triggered on browser.
256+
The way the pagination using a Load More button works is very similar to how infinite scroll works. The only difference is how loading the next page is triggered on the browser.
257257

258258
As we are working directly with the web page without a browser, these two scenarios need to be handled the same way.
259259

@@ -263,7 +263,7 @@ You will see that the response is in JSON format with an attribute `remaining`.
263263

264264
- Each request gets 12 results
265265
- The value of remaining decreases by 12 with every click of Load More
266-
- If we set the value page to 1 in the api url, it get's the first page of the results - `https://smarthistory.org/wp-json/smthstapi/v1/objects?tag=938&page=1`
266+
- If we set the value page to 1 in the API url, it get's the first page of the results - `https://smarthistory.org/wp-json/smthstapi/v1/objects?tag=938&page=1`
267267

268268
![](images/load_more_button.png)
269269

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /