jQuery element constructor differs from using attr
<p>jQuery 1.4 added <a href="http://api.jquery.com/jQuery/#jQuery2" rel="nofollow">a shorthand way for constructing new DOM Elements</a> and filling in some of their attributes:</p>

<blockquote>
  <p><code>jQuery( html, props )</code>  </p>
  
  <p><code>html</code>: A string defining a single, standalone, HTML element (e.g.  or ).</p>
  
  <p><code>props</code>: A map of attributes, events, and methods to call on the newly-created element.</p>
</blockquote>

<p>But, I just noticed this strangeness (with jQuery 1.5.1):</p>

<pre><code>&gt;&gt;&gt; $("&lt;img /&gt;", { height: 4 })[0].height
0
&gt;&gt;&gt; $("&lt;img /&gt;").attr({ height: 4 })[0].height
4
</code></pre>

<p>So, they are some differences between the shorthand and the longer way..! Is this a bug or is it intentional? Are there any other ones with similar behaviour which I should watch out for?</p>
