What is a method?
Methods are Imagine actions which can be used for the current instance of the Imagine. Methods are perfect for custom parallax functionality.
The setSize
method
The first method we’re covering is the set size method which allows you update the size of your element, source and window.
To call the setSize
method, we’ll need to use the following code:
$('.imagine').data('imagine').setSize()
The setPosition
method
The set position method allows you update the position of your main element, source and window.
To call the setPosition
method, we’ll need to use the following code:
$('.imagine').data('imagine').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:
$('.imagine').data('imagine').setOrientation()
The parallax
method
The parallax method updates the element’s animation with the current scroll progress.
To call the parallax
method, we’ll need to use the following code:
$('.imagine').data('imagine').parallax()