gppt_swiper_options (JS)
Description
Filter the options passed to Swiper during initialization.
Usage
window.gform.addFilter( 'gppt_swiper_options', 'my_custom_function' );
Parameters
options object
Options passed to Swiper. See the available options.
instance GPPageTransitions
The current instance of
GPPageTransitions
.
Examples
Scroll to the top of the page instead of form when slides change
/**
* Gravity Perks // Page Transitions // Scroll to top of page instead of top of form
* https://gravitywiz.com/documentation/gravity-forms-page-transitions/
*
* If using Gravity Forms Custom Javascript, you will also need to install
* the follow snippet: https://gravitywiz.com/snippet-library/gfjs-early-init-scripts/
*/
gform.addFilter('gppt_swiper_options', function (options) {
options.on.slideChange = function () {
window.scroll({
top: 0,
left: 0,
behavior: 'smooth'
});
}
return options;
});
Since
This filter is available since Gravity Forms Page Transitions 1.0.