find the next input field which is in next div-jquery
<p>I am getting the last element of the form which has got value, now i want to find the  id of next input element which is in next div... </p>

<pre><code> var elem1 =$(':text[name^=distanceSlab][value!=""]').last(); 
 var nextElemId = // find the id of next input element which is in next div
</code></pre>

<p>the corresponding html code is </p>

<pre><code> &lt;div id ="divid4"&gt;
  &lt;input type="text"  id ="slab4" value ="1"/&gt; // this is the last elemnt which has value
 &lt;/div&gt;

 &lt;div id ="div1d5"&gt;
      &lt;input type="text"  id ="slab5" value =""/&gt; // need to find the id of this element
 &lt;/id&gt;
</code></pre>
