title: jquery getting last input field index
body: <p>I have a number of "sets" of input fields on page, like this: </p>
  
  <pre><code>&lt;div id="allthesets"&gt;
     &lt;div&gt;
        &lt;input name="po-3" type="text"&gt;
        &lt;input name="ba-3" type="text"&gt;
     &lt;/div&gt;
  
     &lt;div&gt;
        &lt;input name="po-9" type="text"&gt;
        &lt;input name="ba-9" type="text"&gt;
     &lt;/div&gt;
  
     &lt;div&gt;
        &lt;input name="po-123" type="text"&gt;
        &lt;input name="ba-123" type="text"&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="rightafterthesets"&gt;
     This is the div that comes right after the sets
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to get the greatest index (in this case 123) using jquery. Notice that each set is in a div, but those divs don't have unique ids. However all the sets are included in a div <code>id="allthesets"</code> and the div right after it is <code>id="rightafterthesets"</code>. Since the greatest index is the latest, I'm thinking the <code>rightafterthesets</code> div could be helpful in getting the last index, if I could somehow figure out the way to back up.</p>