Appending a fragment to a node is not working in ie 7 but working in ie8
<p>I am using the following code to append some <code>ul</code> and <code>li</code> elements directly into the DOM. I am using a fragment and appending the child nodes to the fragment and at last appending the fragment to the node.</p>

<pre><code>function updateTree(objArray,leafClass){

    var currentElement = document.getElementById(currentNodeId);
    currentElement.setAttribute("class",'jstree-open jstree-unchecked');
    var fragment = document.createDocumentFragment();
    var ulElement = document.createElement('ul');
    var i = objArray.length;
    //LoopStart
    for (var i = 0, j = objArray.length ; i &lt; j; i++ ){
    //while(i--){
    var liElement = document.createElement('li');

    liElement.setAttribute("id", objArray[i].attr.id);
    liElement.setAttribute("class",'jstree-closed jstree-unchecked '+leafClass+'');
    liElement.innerHTML = "&lt;ins class=\"jstree-icon\"&gt;&amp;nbsp;&lt;/ins&gt;&lt;a href=\"#\" class=\"\"&gt;&lt;ins class=\"jstree-checkbox\"&gt;&amp;nbsp;&lt;/ins&gt;&lt;ins class=\"jstree-icon\"&gt;&amp;nbsp;&lt;/ins&gt;" + objArray[i].data + "&lt;/a&gt; ";

    if(currentElement.getAttribute("class").indexOf('leaf') &gt; 0){
        ulElement.appendChild(liElement);
        fragment.appendChild(ulElement);
        //$(currentElement.childNodes[1]).removeClass('jstree-laoding');
        //console.log("update Tree inside if: " + objArray[i].data);
        return "OK";
    }

    ulElement.appendChild(liElement);
    fragment.appendChild(ulElement);
    //console.log("update Tree for : " + objArray[i].data);
    //}
    }
    //LoopEnd
    currentElement.appendChild(fragment.cloneNode(true));
    currentElement.childNodes[1].setAttribute("class","");
    //console.log("update Tree end: ");
    ////console.log("time"+timer.getDiff());
    //$(currentElement.childNodes[1]).removeClass('jstree-laoding');
    return "OK";
  }
</code></pre>

<p>The code is working fine in IE8 and Firefox, but in IE7, I cannot see the elements that I am appending; the page is blank.</p>
