jquery append not working in IE with var declaration?
<p>First of all here are a lot of discussion on stackoverflow about this question, however this one is quite different. I had the code <br><br>
in html it is <code>&lt;table id="taxonomyUpload"&gt;&lt;/table&gt;</code><br><br></p>

<pre><code>var rowM = $("&lt;tr id=" + fileRowName + "&gt;");
rowM.append($("&lt;td bgcolor='#578ABA' height='10%' align='center'&gt;&lt;x class='ez'&gt;" + fileName 
+ ":&lt;/x&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='file' id='" + fileName + "' name='" + fileName 
+ "' size='40' onchange='checkFiles(this);'/&gt;&lt;/td&gt;&lt;td&gt;&lt;div id=" + fileMinusDivName + " style='display='none''&gt;&lt;img src='images/minus.jpg' height='20' onclick='deleteRow(" 
+ fileRowName + "," + index + ")'/&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div id=" + filePlusDivName + " style='display='inline''&gt;" 
+ "&lt;img src='images/plus.jpg' height='20' onclick='moreFiles()'/&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;"));
$("#taxonomyUpload").append(rowM);
</code></pre>

<p><br><br>this was working fine in firefox but not in IE. After many tries and reading few threads from stackoverflow I thought of not declaring any variable but to directly append the string. And my final code is <br><br></p>

<pre><code>$("#taxonomyUpload").append($("&lt;tr id=" + fileRowName + "&gt;&lt;td bgcolor='#578ABA' height='10%' align='center'&gt;&lt;x class='ez'&gt;" + fileName 
+ ":&lt;/x&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='file' id='" + fileName + "' name='" + fileName 
+ "' size='40' onchange='checkFiles(this);'/&gt;&lt;/td&gt;&lt;td&gt;&lt;div id=" + fileMinusDivName + " style='display='none''&gt;&lt;img src='images/minus.jpg' height='20' onclick='deleteRow(" 
+ fileRowName + "," + index + ")'/&gt;&lt;/div&gt;&lt;/td&gt;&lt;td&gt;&lt;div id=" + filePlusDivName + " style='display='inline''&gt;" 
+ "&lt;img src='images/plus.jpg' height='20' onclick='moreFiles()'/&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;"));   
</code></pre>

<p><br><br> This way I could get the append code working for IE also. But I am stuck with a question that why did it happen? Is it that var is not supported in IE?</p>
