Created
October 13, 2015 08:47
-
-
Save bepatrickdavid/897a7b03ed1e961182d3 to your computer and use it in GitHub Desktop.
Magnific Popup: img link and a link
This file contains hidden or 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
$('.one-slide').each(function() { // the containers for all your galleries | |
$(this).magnificPopup({ | |
delegate: 'a', // the selector for gallery item | |
type: 'image', | |
gallery: { | |
enabled:true | |
} | |
}); | |
}); | |
$(document).ready(function() { | |
$('#single-post .content .gallery-item').each(function() { // the containers for all your galleries | |
$(this).magnificPopup({ | |
delegate: 'img', // the selector for gallery item | |
type: 'image', | |
gallery: { | |
enabled:true | |
}, | |
callbacks: { | |
elementParse: function(item) { item.src = item.el.attr('src'); } | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment