I’m using a jQuery gallery script and I would like to add a link to the large image but I am not sure how because the div and image are generated on the fly.
I really appreciate any advise or suggestions you might have.
Here’s what I’ve tried which works except the first image is broken for some reason.
.prepend('<div id="' + id + '"><a class="imghold" href="#"></a></div>')
I added the anchor to the div and then this to the img tag:
.appendTo('#' + id + ' a.imghold')
Which works except the first image in the list is broken. for some reason
Think jQuery wrap is what you are looking for.
http://api.jquery.com/wrap/