Infinite Ajax Scroll
Home
Examples
Pricing
Search…
Overview
Installation
Getting started
License
Support
Reference
Options
Methods
Events
Advanced
Triggers
Last page message
History
Overflow
Powered By
GitBook
Last page message
When your pages are finite, it is best practise to inform the user that the last page was hit.
First add an element to your document with the message you want to show.
<
div
class
=
"
no-more
"
>
No more pages
</
div
>
Next add a bit of CSS to hide the element on default:
.no-more
{
opacity
:
0
;
}
Then listen for the
last
event and show to element.
let
ias
=
new
InfiniteAjaxScroll
(
/* config */
);
​
ias
.
on
(
'last'
,
function
()
{
let
el
=
document
.
querySelector
(
'.no-more'
);
​
el
.
style
.
opacity
=
'1'
;
})
​
View this behaviour in a live demo
​
Advanced - Previous
Triggers
Next - Advanced
History
Last modified
9mo ago
Copy link