ユースケースとしては、Twitterのタイムライン表示ページのように最下部までスクロールしたら、そのイベントをキャッチして次ページのツイートをAutoloadして表示させたい!みたいなとき。 $(window).on("scroll", function() { var scrollHeight = $(document).height(); var scrollPosition = $(window).height() + $(window).scrollTop(); if ((scrollHeight - scrollPosition) / scrollHeight === 0) { // when scroll to bottom of the page } }); 上コードでは、ウインドウのスクロール時にスクロール位置が今どれだけなのかを差分を見て計算してる。それが0以下になったら
![jQueryでページ最下部のスクロール時のイベントをキャッチする](https://cdn-ak-scissors.b.st-hatena.com/image/square/57dbbf98bc338ad1ad07b986920c22b24e8e6eba/height=288;version=1;width=512/https%3A%2F%2Fblog.toshimaru.net%2Ficon.png)