3

I'm working on an infinite scroll implementation using IndexedDB. I am at the part where I need to determine the last element visible on the page.

How can I determine whether an element on the page is within the user's current scroll pane? If possible, I would prefer native JS over libraries or plugins for jQuery.

buley
  • 24,595
  • 17
  • 76
  • 99

1 Answers1

1

I understand the reluctance to use jQuery plugins, but when there is one that seems to do exactly what you're looking for - http://www.appelsiini.net/projects/viewport - that's surely the easiest way to go.

Michael Low
  • 23,431
  • 15
  • 75
  • 115