Improve this doc View source

when-visible
directive in module angular-scroll-animate

Description

Allows method hooks into the detection of when an element is scrolled into or out of view.

Usage

as attribute
<ANY when-visible
     when-not-visible="{string}"
     [when-not-visible="{string}"]
     [percentage="{delayPercent}"]
     [override="{bindScrollTo}"]>
   ...
</ANY>

Parameters

ParamTypeDetails
when-not-visiblestring

function to execute when element is scrolled into viewport

when-not-visible
(optional)
string

function to execute when element is scrolled out of viewport

percentage
(optional)
delayPercent

(of px) to delay animate when visible transition.

override
(optional)
bindScrollTo

default scroll event binding to another parent container.

Example

Source







Demo