function isInViewport(element) {
        var rect = element.getBoundingClientRect();
        var html = window.document.documentElement;
        return (
            rect.top >= 0 &&
            rect.left >= 0 &&
            rect.bottom <= (window.innerHeight || html.clientHeight) &&
            rect.right <= (window.innerWidth || html.clientWidth)
        );
    }
function isInViewport(element) {
        var rect = element.getBoundingClientRect();
        var html = window.document.documentElement;
        return (
            rect.top >= 0 &&
            rect.left >= 0 &&
            rect.bottom <= (window.innerHeight || html.clientHeight) &&
            rect.right <= (window.innerWidth || html.clientWidth)
        );
    }
function isInViewport ( element ) { var rect = element . getBoundingClientRect ( ) ; var html = window . document . documentElement ; return ( rect . top >= 0 && rect . left >= 0 && rect . bottom <= ( window . innerHeight || html . clientHeight ) && rect . right <= ( window . innerWidth || html . clientWidth ) ) ; }
Checks if the element is in Viewport in the client browser
Checks if the element is in Viewport in the client browser
Check if an element is in viewport