Widget:ScrollToTopFunction: Difference between revisions
(by SublimeText.Mediawiker) |
(by SublimeText.Mediawiker) |
||
| Line 3: | Line 3: | ||
function () { | 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'); | ||
continueButton.on('click', function(event) { | continueButton.on('click', function(event) { | ||
window.scrollTo(0, 0); | |||
}); | }); | ||
backButton.on('click', function(event) { | backButton.on('click', function(event) { | ||
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>