creating new fragments with class and id behaves strangely in IE8
<p>I have this piece of code which works in Firefox</p>

<pre><code>link = $('&lt;a&gt;link&lt;/a&gt;');
var name = $("&lt;h3 class='name section'&gt;").append(link);
$('#container').append(name);
</code></pre>

<p>However this doesn't work in IE8. It seems that name doesn't get created at all. I tried adding <code>console.log('class of name'+name.attr('class'));</code> and inside the Developer Toolbar, the result is undefined.</p>

<p>Hence I look around for another option, and this works:</p>

<pre><code>var name = $('&lt;h3&gt;');
name.addClass('name');
name.addClass('section');
name = name.append(link);
</code></pre>

<p>It does exactly the same thing. I was wondering if IE8 has a thing against using HTML to define DOM fragments, so I tried this:</p>

<pre><code>var name = $("&lt;div class='name section'&gt;").append(link);
</code></pre>

<p>And this works in IE8.</p>

<p>What esoteric law of jQuery/IE8 did I break? Is it preferable to use addClass or setting the attribute of new DOM fragments over literal HTML?</p>
