What is a method?

Methods are Reveal actions which can be used for the current instance of the Reveal. Methods are perfect for custom scroll reveal functionality.

The setSize method

The first method we’re covering is the set size method which allows you update the size of your element and window.

To call the setSize method, we’ll need to use the following code:

$('.reveal').data('reveal').setSize()

The setPosition method

The set position method allows you update the position of your element and window.

To call the setPosition method, we’ll need to use the following code:

$('.reveal').data('reveal').setPosition()

The setOrientation method

The set orientation method allows you to dynamically set the plugin’s orientation.

To call the setOrientation method, we’ll need to use the following code:

$('.reveal').data('reveal').setOrientation()

The scroll method

The scroll method updates the element’s animation with the current scroll progress.

To call the scroll method, we’ll need to use the following code:

$('.reveal').data('reveal').scroll()

Previous
Events
Read Next
Sources