How to add descriptions in the addImage() function?

Sep 26, 2012 at 6:16 PM
Edited Sep 26, 2012 at 6:16 PM

Hey, thanks for the great plugin.

I'm loading my images dynamically via jQuery/AJAX from an external XML file. I found it easiest to use the


    setTimeout(function() {
      galleries[0].addImage(thumbURL, imgURL);
    }, 1000);



function. Works like a charm! But how do I add the description using this solution? Or do you have any other suggestion on how to achieve this.


Oct 19, 2012 at 6:39 PM
Edited Oct 19, 2012 at 6:55 PM

 Hello Daniel, you can add the description and title to the images as to Tumbnails this:


setTimeout(function() { galleries[0].addImage("images/thumbs/t0.jpg", "images/0.jpg", "ID_image0", "Title image 0", "This is the desctiption"); 
}, 1000);

 then dynamically, you can remove the image from the gallery possibly using the function galleries[0]. RemoveImage (1) also using the setTimeout in this way::

setTimeout(function() { galleries[0].removeImage(0); }, 1000);

Hope that help. Good coding.