I'm building a page of thumbnails with jQuery like this:
ID=this.id; $('#thumbs').empty().html('<span class="title">'+$('#'+ID).html())+'</span><br />'; var i = 1; for (i=1;i<=count[ID];i++) { $('#thumbs').append('<img class="thumb" src="graphics/thumbs/'+ID+'/'+i+'.jpg" />'); }
The idea being that the <span>
would appear, followed by <br />
and then the thumbs, which are simply inline graphics with bottom and right margins, would fill up the rest of the page. And they do-- except, the line break doesn't happen.
I am using Dreamweaver, so I can watch the code live, and sure enough, the script isn't inserting the <br />
tag at all.
Does this have something to do with jQuery's HTML parsing? If so, how to get around it?