Last active
February 13, 2024 17:18
-
-
Save faisalahammad/b77b3ab7fcf308412c7348551ee8348d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
jQuery(document).ready(function($) { | |
setTimeout(function() { | |
$('.et_pb_gallery_pagination a').click(function(event) { | |
event.preventDefault(); | |
$('html, body').animate({ | |
scrollTop: 0 | |
}, 'smooth'); | |
}); | |
}, 1000); | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
document.querySelectorAll('.et_pb_gallery_pagination a').forEach(link => { | |
link.addEventListener('click', function(event) { | |
event.preventDefault(); | |
// Scroll to the top of the page | |
window.scrollTo({ top: 0, behavior: 'smooth' }); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment