I know this doesn't answer the question you're asking, but I wonder if you have/would consider:
A. Using css to space each link, instead of the space character - or - B. Using an unordered list of links, and then with css float them in the cloud. Here's a great article that argues for Option B (UL > LI > A) as more semantic than DIV > A, and then goes on to show a way of making the tag cloud accessible: http://24ways.org/2006/marking-up-a-tag-cloud - Richard On 9/12/07, mrsheep <[EMAIL PROTECTED]> wrote: > > > 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? > >