jquery getting child element values
<p>This is a dumb question, but im stuck. Why does my first one work but not the other 3. From reading the docs, all 4 should do the job. I want to in a bigger use case get an element of a form, there could be other elements on the same page with same name inside other forms or in other divs, so the 4th option is what I really want to work. But I cant figure out why all these dont work.</p>

<p><a href="http://jsfiddle.net/7vF5z/1/" rel="nofollow">http://jsfiddle.net/7vF5z/1/</a></p>

<p>html:</p>

<pre><code> &lt;form id="filter_form_id" name="filter_form" method="get" action="/retrieved_data_records"&gt;

 &lt;select id="brand_id" name="brands"&gt;
 &lt;option value="0"&gt;&lt;/option&gt;
 &lt;option value="143272526"&gt;Brand1&lt;/option&gt;
 &lt;option selected="selected" value="269998788"&gt;Brand2&lt;/option&gt;
 &lt;option value="330516076"&gt;Brand3&lt;/option&gt;
 &lt;option value="330516077"&gt;Brand4&lt;/option&gt;

 &lt;/select&gt;
&lt;/form&gt;
</code></pre>

<p>js:</p>

<pre><code> alert ("The val: " +  $('#brand_id').val() );    
 alert ("The val: " +  $('brands').val() );  
 alert ("The val: " +  $('#filter_form_id brands').val() );  
 alert ("The val: " +  $('#filter_form_id &gt; brands').val() );  
</code></pre>

<p></p>
