Widget:ScrollToTopFunction: Difference between revisions
(by SublimeText.Mediawiker) |
(by SublimeText.Mediawiker) |
||
| Line 1: | Line 1: | ||
<script type="text/javascript"> | <script type="text/javascript"> | ||
// Scroll to top in Pageforms wizard | // Scroll to top in Pageforms wizard | ||
function () { | |||
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'); | ||
| Line 10: | Line 12: | ||
window.scrollTo(0, 0); | window.scrollTo(0, 0); | ||
}); | }); | ||
}; | |||
</script> | </script> | ||
Revision as of 20:08, 5 June 2023
<script type="text/javascript"> // Scroll to top in Pageforms wizard
function () { 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>