1 (edited by max 2014-11-25 13:54:14)

Topic: Include image description to onImageChange event

var jb = new juicebox({
        containerId: 'juicebox-container',
        useFlickr: true,
        flickrSetId: '72157649434903462',
        flickrShowTitle: true,
        flickrShowDescription: true
});

Juicebox includes very limited information to the event.
Please, return at least description, if it is enabled, so that I can pass metadata there.

jb.onImageChange = function(e) {
    console.log(e);
    // Object {id: 1, title: "...", caption: "Rastaganesh"} 
}

Re: Include image description to onImageChange event

You can get the image title and image caption within onImageChange as follows:

<!--START JUICEBOX EMBED-->
<script src="jbcore/juicebox.js"></script>
<script>
var jb = new juicebox({
    containerId: 'juicebox-container'
});
jb.onImageChange = function(e) {
    var imageTitle = jb.getImageInfo(e.id).title;
    var imageCaption = jb.getImageInfo(e.id).caption;
};
</script>
<div id="juicebox-container"></div>
<!--END JUICEBOX EMBED-->