How can I access the previous elements of an element using JQuery?
<p>I want to acces san element's previous element that matches a given id..How can I achieve that? I tried the following code but it returning me undefined.. How can I fix this?</p>

<pre><code>       &lt;label&gt;Durée du project (MM/DD/YYYY): De
                    &lt;select name="month" class="Required"&gt;
                        &lt;option&gt;Aug&lt;/option&gt;
                    &lt;/select&gt;
                    &lt;select name="date" class="Required"&gt;
                        &lt;option&gt;31&lt;/option&gt;
                    &lt;/select&gt;
                    &lt;select name="Year" class="Required"&gt;
                        &lt;option&gt;2011&lt;/option&gt;
                    &lt;/select&gt;
                     &lt;input type="hidden"  class="datepicker1" id="datepck1"/&gt;
      &lt;/label&gt;

  &lt;script language="javascript"&gt;
       $(document).ready(function(){
         alert($("#datepck1").prev("select[name=date]").attr("name"));
  })

  &lt;/script&gt;
</code></pre>
