I don't understand very well this code:
var img = $('<img/>', {class: "photo", src: photo.url_n, width: wt, height: ht}).css("margin", border + "px");
It seems to create an image tag: <img src="" class="photo" ... />
. I just want to wrap it with a link: <a href="#aaaa"></a>
But I am trying this and it doesn't work:
$(img).wrap('<a></a>');
I have also tried just:
img.wrap('<a></a>');
Finally the code add the img
to another element like this:
d_row.append(img);
$(img).wrap('<a />');
?