So what I’m trying to do is to add an outside div container by append first, then content, then append last. But the result seems to be that the I added at the beginning closed itself by automatically inserting a . Results in two separate divs.
Anyone? Thanks!
//adds the outer div tag here...
$('#aspcal tr:eq(' + loopweek + ') td:eq(' + loopday + ')')
.append("<div id='outer' style='height:15px'>");
//adds the inner content here...
for (l = 0; l < rssArray.length; l++) {
if (eleArray[l][19] == curNumMonth
&& eleArray[l][20] == curNumDay
&& eleArray[l][21] == curNumYear) {
$('#aspcal tr:eq(' + loopweek + ') td:eq(' + loopday + ')')
.append("</br><div style='height:auto'><b>"
+ eleArray[l][8]
+ "</b></br><a href='"
+ eleArray[l][0]
+ "' target='_blank'>"
+ eleArray[l][1]
+ "</a></div>");
}
//adds the outer div closing tag here...
$('#aspcal tr:eq(' + loopweek + ') td:eq(' + loopday + ')').append("</div>");
Create the
DIVobject first, append content to it, then append theDIVto your#aspcaltable. Like this: