Jquery add property to appended div
<p>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 <code>append()</code> but the caption doesn't appear because I assume the div has to be in HTML prior to loading the js script.</p>

<p>Append function in js </p>

<pre><code>.append('&lt;span class="image-wrapper current"&gt;&lt;a class="advance-link"&gt;&lt;div id="caption"&gt;&lt;/div&gt;&lt;/a&gt;&lt;/span&gt;')
</code></pre>

<p>I want to display captions in the div named caption. </p>

<p>When initializing the plugin I have the following options. </p>

<pre><code>var gallery = $('#thumbs').galleriffic({
                    delay:                     2200,
                    numThumbs:                 20,
                    captionContainerSel:       '#caption'
etc...
</code></pre>

<p>How can I make the caption appear in the <code>#caption</code> div that I appended?</p>
