title: jquery show div only if no results returned in search
body: <p>I have the following code that I need some guidance with please. I need the <strong>#no-results</strong> element to appear only if no results are found. Currently it shows <strong>IF</strong> results are found.</p>
  
  <pre><code> $('#no-results').hide();
          $('#video-search-text').keyup(function () {
              $('.video-search').hide();
              $('#no-results').css("display", "none");
              var txt = $('#video-search-text').val(); 
  
              $('.video-search').each(function () {
                  if ($(this).text().toUpperCase().indexOf(txt.toUpperCase()) != -1) {
                      $(this).show(); 
  
                  }
                  else {
                        $('#no-results').css("display", "block");
  
                  }
              });
  
          });
  </code></pre>
  
  <p>I have created the following <a href="http://jsfiddle.net/cvdqLuc7/" rel="nofollow"><strong>JSFiddle</strong></a> for convenience. Thanks</p>