Created
November 11, 2015 09:57
-
-
Save Yago/89f6779dfc3d7f2ed2ab to your computer and use it in GitHub Desktop.
PhotoSwipe - Click
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
$('a').click(function(event){ | |
event.preventDefault(); | |
var $pswp = $('.pswp')[0], | |
options = { | |
index: $(this).parent('figure').index(), | |
bgOpacity: 0.85, | |
showHideOpacity: true | |
}; | |
// Initialize PhotoSwipe | |
var gallery = new PhotoSwipe($pswp, PhotoSwipeUI_Default, container, options); | |
gallery.init(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment