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
  • 28,032
  • 17
  • 85
  • 106

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
  • 24,276
  • 16
  • 82
  • 119