title: how to check if a row is checked and a specific cell is empty using jquery?
body: <p>Basically when a user clicks submit in my MVC 3 application.
  I want to use jquery to check if any of the rows selected (selected via checkboxes) have any value in a particular cell in that row.
  and is not display an alert mgs or validation error.</p>
  
  <p>Rough code attempt:</p>
  
  <pre><code>$("#MultiSubBtn").click(function () {
          if ((':checkbox').is(':checked') &amp;&amp; ('td').find("attBtn").isempty())
              alert("there is a cert missing");
      });
  </code></pre>
  
  <p>In the above MultiSubBtn is the id on my Submit btn.
  and the cell I am trying to query id a </p>
  
  <p>Still learning when it comes to jquery , here is the full html page.
  I removed some elements to reduce page size.</p>
  
  <p></p>
  
  <pre><code> &lt;div id="tabs-1" style="position:relative; left:-12%;"&gt;
  
      @using (Html.BeginForm("SentMultipleCalsToCustomer", "CalibrationViewer", FormMethod.Post))
      {
  
          @* This is the table that contains a single page of the paginated table of recent calibrations *@
       &lt;table id="all-calibrations" class="grid tracker-grid" style="width:77%"&gt;
          &lt;colgroup&gt;
              &lt;col class ="" style="width:11%"&gt;
              &lt;col class="workno-data" style="width:13%"&gt;
              &lt;col class="equipmentId-data" style="width:8%"&gt;
              &lt;col class="equipmentDesc-data" style="width:12%"&gt;
          &lt;/colgroup&gt;
  
      &lt;thead&gt;
          &lt;tr&gt;
          @* ADDED 20/08/2014 *@
              &lt;th&gt;Select&lt;/th&gt;
              &lt;th&gt;Work&lt;br /&gt;No.&lt;/th&gt;
              &lt;th&gt;ID&lt;/th&gt;
              &lt;th&gt;Description&lt;/th&gt;
              @* the customer column is only shown for LTS users since customer only see 1 customers data *@
              @if (this.User.IsInRole("LTS User Passive"))
              {
                  &lt;th style="width:15%;"&gt;Customer&lt;/th&gt;
              }
              &lt;th style="text-align: center; width:15%;"&gt;Cert&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
  
      &lt;tbody&gt;
           @* iterate through each calibration shown on this page *@
           @for (int index = 0; index &lt; Model.Count(); index++)
           {
           @Html.HiddenFor(m =&gt; Model.ElementAt(index).CustomerName)
              &lt;tr&gt;
  
              @* The work number is a link to the calibration the work no. represents *@
             &lt;td&gt;&lt;input type="checkbox" name="selectecals" value="@Model.ElementAt(index).Id"/&gt;&lt;/td&gt;
  
              &lt;td&gt;@Html.ActionLink("WN–" + @Html.DisplayFor(m =&gt; Model.ElementAt(index).Id), "Index", "CalibrationViewer", new { id = Model.ElementAt(index).Id }, null)&lt;/td&gt;
              &lt;td&gt;@Html.DisplayFor(m =&gt; Model.ElementAt(index).EquipmentID)&lt;/td&gt;
              &lt;td&gt;@Html.DisplayFor(m =&gt; Model.ElementAt(index).EquipmentDescription)&lt;/td&gt;
              @* once again only the lts user sees the customer column data *@
              @if (this.User.IsInRole("LTS User Passive"))
              {
                  &lt;td&gt;@Html.DisplayFor(m =&gt; Model.ElementAt(index).CustomerName)&lt;/td&gt;
              }
  
            @*   if the calibration has an attachment display the name of the file,
               else display the Upload button*@
  
               @if (Model.ElementAt(index).CertName != null)
               {
                   &lt;td style="background-color:#33CC00; color:#fff;"&gt;@Html.DisplayFor(m =&gt; Model.ElementAt(index).CertName)&lt;/td&gt;
               }
               else
               {     // style="background-color:#5C9CCC"  // ----- to allow for btn           
                  &lt;td id ="attBtn" class="file-uploader-attachment-Class"&gt;&lt;/td&gt;
               }
  
           &lt;/tr&gt;  
  
               &lt;script type="text/javascript"&gt;
                   var CUST_NAME = '@Model.ElementAt(index).CustomerName'; 
              &lt;/script&gt;
           }
      &lt;/tbody&gt;  
  &lt;/table&gt;            
  
           if (Model.Count() != 0)
           {
          &lt;div id="calibrationViewer-rightColumn" style="display:inline-block; position:absolute; top:8.5%; left:80%; width:20%"&gt;
                 @{Html.RenderPartial("StatusForm", InstrumentTracker.Common.Enums.Status.Finished_Calibration);}   
  
                 &lt;input type="submit" style="width:100%;" class="styledbutton" id="MultiSubBtn" value="Submit" /&gt;
                 &lt;input type="hidden" name="customer" value="@ViewBag.CustomerName" /&gt;  
                 &lt;br /&gt; &lt;br /&gt;
      &lt;button class="styledbutton" style="width:100%;" onclick="window.location.href='/Tracker/Index'"&gt;Return to Main Tracker Page&lt;/button&gt;
          &lt;/div&gt;
           }
      } @*end using form tag*@
  
  &lt;/div&gt;​
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function () {
  
     $("#MultiSubBtn").click(function () {
          if ((':checkbox').is(':checked') &amp;&amp;    ('td').find("attBtn").isempty())
              alert("there is a cert missing");
      });
  
  
  
      function handleCheckbox() {
          if ($(this).find(':checkbox').is(':checked')) {
              $(this).find('.file-uploader-attachment-Class').removeClass("upload-placeholder-unchecked");
  
              createUploader($(this));
  
              $(this).find('.qq-upload-list').css("margin", "0px")
  
          }
  
          else {
              $(this).find('.file-uploader-attachment-Class').addClass("upload-placeholder-unchecked");
              $(this).find('.file-uploader-attachment-Class').html($('#myHTML2').html());
          }
      }
  
      $('tr').each(handleCheckbox);
      $('tr').on('click', handleCheckbox);
  
  
          });
      }
  });
  </code></pre>
  
  <p></p>