title: Uncaught TypeError: Cannot read property 'find' of null.jquery
body: <p>Getting the error "Uncaught TypeError: Cannot read property 'find' of null." in the console. Underlining this line of code containing the error: 
  <code>if ($sResults.find("product").length &gt; 0)</code></p>
  
  <p>Anyone have any idea why this is happening. Im a beginner so any adivce would help. Thanks.</p>
  
  <pre><code>if ($sResults.find("product").length &gt; 0) {
    // We have some search results
    // The products are in $sResults
  
  
  } else {
    // We don't have any results
    // Hide the table
    $("#mainBody").find("table").hide();
    $("#mainBody").append("&lt;h3&gt;There are no search results. &lt;/h3&gt;");
  }
  </code></pre>