Premium.utils
Premium.utils.getInView(el, threshold)
Parameter | Definition |
---|---|
el | target element required |
threshold | amount to consider as being in view default: 0.5 |
Returns true if el is in view. It works for all the panels of scrolling formats ('is','mt', 'fi', 'hi') and the top and centre panels of the Skin. For all other formats it works in a limited way.
var isInView = Premium.utils.getInView(document.querySelector('.element'));