Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- jQuery(document).ready(function($) {
- $('a[href*=".jpg"], a[href*=".jpeg"], a[href*=".png"], a[href*=".gif"]').each(function(){
- //single image popup
- if ($(this).parents('.gallery').length == 0) {
- $(this).magnificPopup({type:'image'});
- }
- });
- //gallery popup
- $('.gallery').each(function() {
- $(this).magnificPopup({
- delegate: 'a',
- type: 'image',
- gallery: {enabled:true}
- });
- });
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement