[jQuery] Why won't this work in ie ?
In my jquery code I do:
$.each(json, function(i, item) {
$('<a>').attr('href', 'http://example.com').html('test').appendTo
('#gallery');
}
I have a div to hold the content in the html:
<div id="gallery">
</div>
In firefox I will get a series of links, in ie7 i get nothing...
I can replace the code with this and it works fine in ie:
$.each(json, function(i, item) {
$('<img/>').attr('src', item).attr('class', 'thumb').appendTo
('#gallery');
}
Something about the chaining perhaps?