Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkVisible(elmId) {
- var rect = elm.getBoundingClientRect();
- var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
- return !(rect.bottom < 0 || rect.top - viewHeight >= 0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement