4

Such as, in my case, an element at the bottom of each page with a Disqus comment thread inside. These alone take a few seconds to load on each page, and it would greatly improve performance if they could be loaded only if the user actually views them.

Hamster
  • 2,612
  • 6
  • 24
  • 37

1 Answers1

1

I was about to suggest handling the scroll event and then checking if the element in question has moved into the viewport, but while researching I found this:

jquery-appear - jQuery plugin to call a function when an element becomes visible

(via another question here on SO: jQuery - Check if element is visible after scroling)

Community
  • 1
  • 1
Nickolay
  • 28,261
  • 8
  • 94
  • 160