-2

I saw that I can detect if the browser window is scrolled to bottom.

How to detect if browser window is scrolled to bottom?

But I wonder if it is possible to detect if the browser window is scrolled to the right edge of a page since I am making a horizontally long page.

Bongpalman
  • 119
  • 1
  • 2
  • 7
  • 4
    Have you tried using the solution in the linked question with all the vertical properties replaced with their horizontal equivalents? Essentially using `(window.innerWidth + window.scrollX) >= document.body.offsetWidth` as the predicate – MTCoster Jan 13 '19 at 21:20

1 Answers1

0

try this...

if ( $(document).scrollTop() == ( $(document).height() - $(window).height() ) {
  // Do something here ...
}
check here..

http://jsfiddle.net/cNmhR/24/

Rajasimman R
  • 496
  • 4
  • 14