code: function(t) { // check if this.tooltip is in viewport
        var r = t.getBoundingClientRect();
        return (
        r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth))
        }
docs: Native Javascript for Bootstrap 3 | Internal Utility Functions by dnp_theme