Skip to content

Instantly share code, notes, and snippets.

@bulbul84
Last active August 2, 2018 16:51
Show Gist options
  • Save bulbul84/a81b46b90f05f4e8de28cabded8f2fc7 to your computer and use it in GitHub Desktop.
Save bulbul84/a81b46b90f05f4e8de28cabded8f2fc7 to your computer and use it in GitHub Desktop.
Magnific Popup Jumping Problem Fixed
$('.open-link').magnificPopup({
type: 'image',
closeOnBgClick: true,
fixedContentPos: false,
callbacks: {
open: function() {
jQuery('body').addClass('noscroll');
},
close: function() {
jQuery('body').removeClass('noscroll');
}
}
});
Finally, create a CSS rule for noscroll as :
body.noscroll {
overflow-y: hidden!important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment