Reputation: 13
how do I check whether the scrollbar is at the beginning or end with jquery? For the beginning part i would check if $(window).scrollTop <= 0
, but what should i use for the end?
Thank you
Upvotes: 1
Views: 155
Reputation: 359816
Use this:
($(window).scrollTop() + $(window).height() >= $(document).height())
Upvotes: 2