Selecting an element by a class using javascript or jQuery
<p>I have the following html snippit;</p>

<pre><code>&lt;input name='first' class="foo" /&gt;
&lt;input name='second' class="foo bar" /&gt;
&lt;input name='third' class="foo" /&gt;
</code></pre>

<p>I want to set the value of a specific element, but i'm unable to select the right one. This is whar i've tried:</p>

<pre><code>jQuery('.bar').val('selected');
</code></pre>
