I’m using a slideshow plugin that lets me set the div in which I want image captions to appear. I’m creating the caption div dynamically in js using append() but the caption doesn’t appear because I assume the div has to be in HTML prior to loading the js script.
Append function in js
.append('<span class="image-wrapper current"><a class="advance-link"><div id="caption"></div></a></span>')
I want to display captions in the div named caption.
When initializing the plugin I have the following options.
var gallery = $('#thumbs').galleriffic({
delay: 2200,
numThumbs: 20,
captionContainerSel: '#caption'
etc...
How can I make the caption appear in the #caption div that I appended?
I could be wrong, but i would think the jQuery plugin is looking for an actual jQuery object. So rather than,
you have
Give that a try and let us know.