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/
*
* 1. Install this snippet with our free Code Chest plugin.
* https://gravitywiz.com/gravity-forms-code-chest/
*/
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.