I have a number of "sets" of input fields on page, like this:
<div id="allthesets">
<div>
<input name="po-3" type="text">
<input name="ba-3" type="text">
</div>
<div>
<input name="po-9" type="text">
<input name="ba-9" type="text">
</div>
<div>
<input name="po-123" type="text">
<input name="ba-123" type="text">
</div>
</div>
<div id="rightafterthesets">
This is the div that comes right after the sets
</div>
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 id="allthesets"
and the div right after it is id="rightafterthesets"
. Since the greatest index is the latest, I'm thinking the rightafterthesets
div could be helpful in getting the last index, if I could somehow figure out the way to back up.