Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2013
11,422
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. jQuery(document).ready(function($) {
  2.     $('a[href*=".jpg"], a[href*=".jpeg"], a[href*=".png"], a[href*=".gif"]').each(function(){
  3.         //single image popup
  4.         if ($(this).parents('.gallery').length == 0) {
  5.             $(this).magnificPopup({type:'image'});
  6.         }
  7.     });
  8.     //gallery popup
  9.     $('.gallery').each(function() {
  10.         $(this).magnificPopup({
  11.             delegate: 'a',
  12.             type: 'image',
  13.             gallery: {enabled:true}
  14.         });
  15.     });
  16. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement