Question

i'm using photogrid and colorbox to show pictures. I want to include the title of the image in the colorbox presentation, but i can't find which function is must use.

In the body i have:

.
<img src="albums/a-2/trein-3.jpg" title="Januari 2014 - Heerlen">
<img src="albums/a-2/trein-4.jpg" title="Januari 2014 - Heerlen">
.
<script type="text/javascript">
$('.my-example-grid').photosetGrid({
    highresLinks: true,
    rel:'whithhearts-gallery',
    gutter:'1px',
    layout:'1311411141',
    onComplete: function(){
    $('.my-example-grid').attr('style','');
    $('.my-example-grid a').colorbox({
     photo: false,
     scalePhotos: true,
            title:function () {
              <--what code??? ,
     maxHeight:'90%',
     maxWidth:'90%'
    });
    }
    });

Can someone help me?

Thanks, Fred

Was it helpful?

Solution

title: function () {
    return $("img", this).attr("title");
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top