Select Element From List by Index with jQuery
<pre><code>&lt;form id="foo"&gt;
    &lt;input&gt;&lt;/input&gt;
    &lt;input&gt;&lt;/input&gt;
    &lt;input&gt;&lt;/input&gt;
&lt;/form&gt;
</code></pre>

<p>I want to do:</p>

<p><code>document.getElementById("foo").getElementsByTag("input")[1];</code></p>

<p>But in jQuery. I want to select a certain object under #foo by an index.</p>

<p>This is my first guess as to how to do this:</p>

<p><code>$('#foo input[1]').val("BlahBlah");</code></p>

<p>I think it would be the same in CSS too.</p>
