feimosi/baguetteBox.js — pull request #15 by leomelzer (2014-11-10 14:44:55+00:00)
Title: Add option to pass callback as 

Hey Marek,
thanks for making baguetteBox.js!
I replaced an old Lightbox script with yours yesterday and it worked out of the box like a charm. Only one small issue: I had to patch the src because the previous script was reading the captions from the image alt attribute, not the anchor tag.

Now `captions` can be `true`, `false`, or a user-defined callback function, e.g. returning the images' alt attribute like this:

```javascript
baguetteBox.run('.baguetteBoxFive', {
captions: function(element) {
// `this` == Array of current gallery items
return element.getElementsByTagName('img')[0].alt;
}
});
```

I don't know if you are looking for contributions but maybe you or someone else finds this useful.

Cheers! Leo