Skip to content

Instantly share code, notes, and snippets.

@az1979
Last active January 25, 2018 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save az1979/97b1b51e1a3a5e8fc5274dd40184376a to your computer and use it in GitHub Desktop.
Save az1979/97b1b51e1a3a5e8fc5274dd40184376a to your computer and use it in GitHub Desktop.
WordPressの画像をモーダルウィンドウで表示しよう! - JavaScript
jQuery(document).ready(function() {
jQuery('.entry-content a[href$=".png"],a[href$=".gif"],a[href$=".jpg"],a[href$=".jpeg"]').has('img').magnificPopup({
type:'image',
closeOnContentClick: true,
showCloseBtn: false,
image: {
verticalFit: false
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment