I'm trying to generate a table with a simple 'for' loop, and all rows and cells generate just fine, but they appear empty in Firefox. If you try to log cells' innerText on any stage, the content is there, it seems that it's that breaks everything.
Here's code sample: http://jsfiddle.net/7s8e4w3p/
html
<table id="table">
<tr>
<th>This</th>
<th>Is</th>
<th>Table</th>
<th>Header</th>
<th>in</th>
<th>JsFiddle</th>
</tr>
</table>
css
th, td {
border: 1px solid black;
}
js
for(var i=0; i<=5; i++){
var tr = document.createElement('tr');
for(var j=0; j<=5; j++){
var td = document.createElement('td');
td.innerText = "test";
tr.appendChild(td);
}
document.getElementById('table').appendChild(tr);
}
Works perfectly well in Chrome, IE, Opera, mobile Safari and even Android browser. What am I missing?