Widget:ScrollToTopFunction: Difference between revisions
(by SublimeText.Mediawiker) |
(by SublimeText.Mediawiker) |
||
| Line 2: | Line 2: | ||
// Scroll to top in Pageforms wizard | // Scroll to top in Pageforms wizard | ||
function() { | function event() { | ||
var continueButton = document.getElementsByClassName('pf-wizard-continue-button'); | var continueButton = document.getElementsByClassName('pf-wizard-continue-button'); | ||
var backButton = document.getElementsByClassName('pf-wizard-back-button'); | var backButton = document.getElementsByClassName('pf-wizard-back-button'); | ||
Revision as of 20:08, 5 June 2023
<script type="text/javascript"> // Scroll to top in Pageforms wizard
function event() { var continueButton = document.getElementsByClassName('pf-wizard-continue-button'); var backButton = document.getElementsByClassName('pf-wizard-back-button');
continueButton.on('click', function(event) { window.scrollTo(0, 0); }); backButton.on('click', function(event) { window.scrollTo(0, 0); }); }; </script>