Created
April 22, 2013 10:14
-
-
Save jameschambers/5433746 to your computer and use it in GitHub Desktop.
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
// Info on loading images via JSON http://galleria.io/docs/references/data/ | |
var images = { | |
"image": "http://image.url" | |
} | |
Galleria.run(s.galleryElem, { | |
dataSource: images, | |
preload: 1, | |
transition: 'fade', | |
imageCrop: true, | |
thumbnails: false, | |
showInfo: false, | |
debug: true, | |
showImageNav: true, | |
extend: function () { | |
var gallery = this; | |
/* Set the slide numbers | |
------------------------------------------------- */ | |
$('.total-slide-num').html(gallery.getDataLength()); | |
// Fired every time an image shows | |
gallery.bind("image", function (e) { | |
// Ensure the gallery is visible | |
$(s.galleryElem).animate({'opacity': 1}, 0, function () { | |
// Toggle the body colour | |
toggleBodyColor(e.galleriaData.dataColor); | |
}); | |
$('.current-slide-num').html(gallery.getIndex() + 1); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment