How do I check whether the scrollbar is at the beginning or end?
how do I check whether the scrollbar is at the beginning or end with jquery?开发者_JS百科 For the beginning part i would check if $(window).scrollTop <= 0
, but what should i use for the end?
Thank you
Use this:
($(window).scrollTop() + $(window).height() >= $(document).height())
精彩评论