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 | $( document ).ready(function() { | ||
var buttons = document.getElementsByClassName('pf-wizard-buttons a'); | var buttons = document.getElementsByClassName('pf-wizard-buttons a'); | ||
| Line 8: | Line 8: | ||
setTimeout(function() {window.scrollTo(0, 0); }, 300 ); | setTimeout(function() {window.scrollTo(0, 0); }, 300 ); | ||
}); | }); | ||
}; | }); | ||
</script> | </script> | ||
Revision as of 12:03, 6 June 2023
<script type="text/javascript"> // Scroll to top in Pageforms wizard
$( document ).ready(function() { var buttons = document.getElementsByClassName('pf-wizard-buttons a');
buttons.on('click', function(event) { setTimeout(function() {window.scrollTo(0, 0); }, 300 ); }); }); </script>