title: how to get the value of a specific sibling element using id
body: <p>I want to get the value of a specific sibling element using id, I build the form at run time and there are many element have the same id but in different divisions. I tried to use 
  $(this).siblings("#BillNo").val();
  $(this).prev("#BillNo").val();
  but both return undefined value</p>
  
  <p>this the code at run time : commission </p>
  
  <pre><code>&lt;div id="bill1" class="bill hide withPadding"&gt;
      &lt;h3&gt;Bill 1&lt;/h3&gt;
      &lt;span&gt;
      &lt;label&gt;Bill no&lt;/label&gt;
      &lt;input type="text" name="billNo" class="textField" id="BillNo"/&gt;
      &lt;/span&gt;
      &lt;span&gt;
      &lt;label&gt;Bill total&lt;/label&gt;
      &lt;input type="text" name="billTotal" class="textField" id="BillTotal"/&gt;
      &lt;/span&gt;
      &lt;span&gt;
      &lt;input type="button" name="addBillDetails" value="Add bill items" id="addBillDetails"/&gt;
      &lt;/span&gt;
  &lt;/div&gt;  
  
  &lt;div id="bill2" class="bill hide withPadding"&gt;
      &lt;h3&gt;Bill 2&lt;/h3&gt;
      &lt;span&gt;
      &lt;label&gt;Bill no&lt;/label&gt;
      &lt;input type="text" name="billNo" class="textField" id="BillNo"/&gt;
      &lt;/span&gt;
      &lt;span&gt;
      &lt;label&gt;Bill total&lt;/label&gt;
      &lt;input type="text" name="billTotal" class="textField" id="BillTotal"/&gt;
      &lt;/span&gt;
      &lt;span&gt;
      &lt;input type="button" name="addBillDetails" value="Add bill items" id="addBillDetails"/&gt;
      &lt;/span&gt;
  &lt;/div&gt;  
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
     $("input#addBillDetails").live('click',function(){
          alert($(this).siblings("#BillNo").val());
          alert($(this).prev("#BillNo").val());
  
          });
  }
  &lt;/script&gt;
  </code></pre>