I am trying to add content (div) after an image using append(). All the list items are dynamically generated, I can only add class to the 'ul'.
Here's the fiddle: http://jsfiddle.net/krish7878/ggyDf/3/
<ul class="footer-8-flickr">
<li> <a href="#"> <img src="#"></a></li>
<li> <a href="#"> <img src="#"></a></li>
<li> <a href="#"> <img src="#"></a></li>
<ul>
$("ul.footer-8-flickr li a img").append("<div class='overlay'><p>Content</p></div>");
May be I am missing something.