code: function filterOnScreen(element) {
                  var elementBoundingClientRect = element.getBoundingClientRect();
                  // Can't check left/right since it might be scrolled off.
                  return elementBoundingClientRect.top < viewportBoundingClientRect.bottom && elementBoundingClientRect.bottom > viewportBoundingClientRect.top;
              }
docs: Find the elements to slide in