How can I tell if table row is in view using jQuery?

To check if table row exists or not, use the is() method, with the :visible selector −

if($(".row").is(":visible")) {

You can try to run the following code to learn how to chck if a row exists or not. It even notifies when a new row is created −


Live Demo

<!DOCTYPE html>
  <title>jQuery - Add Table Rows</title>
   width: 100%;
   margin: 25px 0;
   border-collapse: collapse;
  table, th, td{
   border: 1px solid #6C220B;
  table th, table td{
   padding: 8px;
   text-align: left;
<script src=""></script>
      if($(".row").is(":visible")) {
        alert("Exists: A new row will create now.");
    var name = $("#name").val();
    var subject = $("#subject").val();
    var markup = "<tr><td><input type='checkbox' name='record'></td><td>" + name + "</td><td>" + subject + "</td></tr>";
    $("table tbody").append(markup);

   <input type="text" id="name" placeholder="Enter Name">
   <input type="text" id="subject" placeholder="Enter Subject">
   <input type="button" class="row" value="Click to Add Row">
     <td><input type="checkbox" name="result"></td>