jQuery returns undefined unexpectedly
<p>The jsfiddle link is <a href="http://jsfiddle.net/PrfZy/1/" rel="nofollow">http://jsfiddle.net/PrfZy/1/</a></p>

<p>The code is:</p>

<pre><code>$button = $('&lt;button /&gt;', { text: "Some text.", name: "myButton"});
alert($button.attr("name"));
alert($button.attr("text"));
</code></pre>

<p>Why is the second alert "undefined"?</p>
