Constructor

ScrollReveal

The function that returns the ScrollReveal instance.

ScrollReveal employs the singleton pattern; no matter how many times the constructor is called, it will always return the same instance. This means we can call it anywhere, worry-free.

Signature

function (options)

Options

objectOptions to use instead of the defaults.

Usage

When calling ScrollReveal(), you can pass it new defaults as an options object to change the default configuration.

ScrollReveal(options);

You can do this as many times as you need, although just once in the <head> after installation is typically enough for most projects, e.g:

<head>
    <script src="https://unpkg.com/scrollreveal"></script>
    <script>
        ScrollReveal({ reset: true });
    </script>
</head>