How can you determine if textboxes inside a table row are empty using jQuery?
<p>I have the following function:</p>

<pre><code> var emptyFields = false;

 function checkNotEmpty(tblName, columns, className){

    emptyFields = false;

     $("."+className+"").each(function() {
          if($.trim($(this).val()) === "" &amp;amp;&amp;amp; $(this).is(":visible")){
             emptyFields = true;
             return false; // break out of the each-loop
          }
     });

      if (emptyFields) {
             alert("Please fill in current row before adding a new one.")
       } else {
              AddRow_OnButtonClick(tblName,columns);
       }
}
</code></pre>

<p>Its checking that all elements in the table are not empty before adding a new row, and <strong>I only need to check that the last row of the table has at least an element which its not empty and not the whole table</strong>.</p>

<p>The className its applied to the table. Please notice, that the problem I have its checking the last row and only one element of the row has to have some text in it. (e.g. each row has 5 textboxes at least one textbox need to have some text inside in order to be able to add another row, otherwise, the alert comes up).</p>

<p>Any help would be apreciated.</p>

<p>Thanks</p>
