We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scroll happens when element isn't in viewport, so let's check if it's in viewport or not
function isElementInViewport (el) { var rect = el.getBoundingClientRect(); return ( rect.top >= 0 && rect.left >= 0 && rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && rect.right <= (window.innerWidth || document.documentElement.clientWidth) ); }
this should work for all browsers, i think this polyfill is doing too much work even if nothing has scrolled
The text was updated successfully, but these errors were encountered:
No branches or pull requests
scroll happens when element isn't in viewport, so let's check if it's in viewport or not
this should work for all browsers, i think this polyfill is doing too much work even if nothing has scrolled
The text was updated successfully, but these errors were encountered: