Widget:ScrollToTopFunction: Difference between revisions

From Tsadra Foundation Advanced Contemplative Scholarships
(by SublimeText.Mediawiker)
(by SublimeText.Mediawiker)
Line 2: Line 2:
// Scroll to top in Pageforms wizard
// Scroll to top in Pageforms wizard


function event() {
$( 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>