Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Close Modal when page scrolls
jQuery(document).ready(function() {
jQuery('a[href^="#"]').click(function() {
// smooth scroll
jQuery('html, body').animate({
scrollTop: $($.attr(this, 'href')).offset().top
}, 500);
// close modal
setTimeout(function (){
oxyCloseModal();
}, 500);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment