Client side javascript, creation of several elements and show each asap
- by Sirius Lampochkin
Client side javascript code create some elements (about 50-100) in cycle:
for (var i = 0; i < list.Length; i++) {
var obj = document.createElement("DIV");
obj.innerHTML = "<span class=\"itemId\">" + list[i].Id
+ "</span><!-- some more simple code --> ";
mainObj.appendChild(obj);
}
There is some problem with browser rendering, for example IE just freeze until he finished the cycle and then shows all elements in one time.
Is there a way to show each created element separately and immediately after "appendChild()"?