[jQuery] problem with spaces between html elements in ie

[jQuery] problem with spaces between html elements in ie


hi, i'm trying to load tags into a tagcloud dynamically doing
something like:
...
<div id="tagcloud"></div>
....
tags= ["first", "second", "third"];
$.each (tags, function (i, textval) {
var newTag= $("<a href='#'></a>").text(textval).attr ("tagId", i);
newTag.addClass ("tag");
$("#tagcloud").append(newTag).append(" ");
});
and that works fine in ff and opera but in ie (6-7) the tags appear
without spaces in between ('firstsecondthird').
any suggestion?