File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 11/**
2- * Gravity Perks // Page Transitions // Scroll to Top for Long Pages
2+ * Gravity Perks // Page Transitions // Scroll to top of page instead of top of form
33 * https://gravitywiz.com/documentation/gravity-forms-page-transitions/
4+ *
5+ * If using Gravity Forms Custom Javascript, you will also need to install
6+ * the follow snippet: https://github.com/gravitywiz/snippet-library/blob/master/experimental/gfjs-early-init-scripts.php
47 */
5- gform . addAction ( 'gppt_before_transition' , function ( ) {
6- window . scroll ( {
7- top : 0 ,
8- left : 0 ,
9- behavior : 'smooth'
10- } ) ;
11- } ) ;
8+ gform . addFilter ( 'gppt_swiper_options' , function ( options ) {
9+ options . on . slideChange = function ( ) {
10+ window . scroll ( {
11+ top : 0 ,
12+ left : 0 ,
13+ behavior : 'smooth'
14+ } ) ;
15+ }
16+
17+ return options ;
18+ } ) ;
You can’t perform that action at this time.
0 commit comments