title: How to search with JavaScript
body: <p>I need to make a search bar to find <code>h1</code> in divs but I need also to hide the hall div not only <code>h1</code> that not matches I found this on w3school but I don't know how <code>$(this)</code> works I need to select the div with class <code>blog-card</code></p>
  
  <pre><code>        &lt;input id="myInput" type="text" placeholder="Search.." /&gt;
  
  
  &lt;div class="blog-card col-sm-12 col-md-6"&gt;
              &lt;div class="meta"&gt;
                  &lt;div class="photo" style="background-image: url(https://storage.googleapis.com/chydlx/codepen/blog-cards/image-1.jpg)"&gt;&lt;/div&gt;
                  &lt;ul class="details"&gt;
                      &lt;li class="author"&gt;&lt;a href="#"&gt;John Doe&lt;/a&gt;&lt;/li&gt;
                      &lt;li class="date"&gt;Aug. 24, 2015&lt;/li&gt;
                      &lt;li class="tags"&gt;
                          &lt;ul&gt;
                              &lt;li&gt;&lt;a href="#"&gt;Learn&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;Code&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;HTML&lt;/a&gt;&lt;/li&gt;
                              &lt;li&gt;&lt;a href="#"&gt;CSS&lt;/a&gt;&lt;/li&gt;
                          &lt;/ul&gt;
                      &lt;/li&gt;
                  &lt;/ul&gt;
              &lt;/div&gt;
              &lt;div class="description"&gt;
                  &lt;h1&gt;Learning to Code&lt;/h1&gt;
                  &lt;h2&gt;Opening a door to the future&lt;/h2&gt;
                  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ad eum dolorum architecto obcaecati enim dicta praesentium, quam nobis! Neque ad aliquam facilis numquam. Veritatis, sit.&lt;/p&gt;
                  &lt;p class="read-more"&gt;
                      &lt;a href="#"&gt;Read More&lt;/a&gt;
                  &lt;/p&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
  $(document).ready(function () {
      $("#myInput").on("keyup", function () {
          var value = $(this).val().toLowerCase();
          $(".blog-card .description h1").filter(function () {
              $(this).toggle($(this).text().toLowerCase().indexOf(value) &gt; -1)
          });
      });
  });
  </code></pre>