title: How do I get both inputs to work with the search bar?
body: <p>At the moment I've got the following code. When a user inerts text into the 'name' &amp; 'sku' inputs, I need it to display the correct div based on the search after the button is clicked.</p>
  <p>Below is the jquery &amp; html code being used.</p>
  <p>Please assist me with this one, not sure where I went wrong</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>jQuery($ =&gt; {
    var $search = $("#search-form").on('submit', e =&gt; {
      e.preventDefault();
      //$btns.removeClass('active');
      let value = $('#search-name').val();
  
      $('.box').show().not(function() {
        return new RegExp(value, 'gi').test($(this).find('.name, .sku').text());
      }).hide();
    });
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
      &lt;div class="row"&gt;
        &lt;div class="col-md-4"&gt;
          &lt;form id="search-form"&gt;
            &lt;input type="text" id="search-name" class="form-control" placeholder="Search name" /&gt;
            &lt;input type="text" id="search-sku" class="form-control" placeholder="Search sku" /&gt;
            &lt;button type="submit" id="search-button"&gt;Search&lt;/button&gt;
          &lt;/form&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;hr&gt;
      &lt;div class="row" id="parent"&gt;
          &lt;div class="col-md-2 box drink"&gt;
            &lt;div class="text-center"&gt;
              &lt;img src="http://via.placeholder.com/80x80" class="" alt="" /&gt;
              &lt;p class="name"&gt;Pepsi&lt;/p&gt;
              &lt;p class="sku"&gt;D-1251&lt;/p&gt;
              &lt;p&gt;$ 2,410&lt;/p&gt;
              &lt;p class="location"&gt;east&lt;/p&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="col-md-2 box drink"&gt;
            &lt;div class="text-center"&gt;
              &lt;img src="http://via.placeholder.com/80x80" class="" alt="" /&gt;
              &lt;p class="name"&gt;Pepsi&lt;/p&gt;
              &lt;p class="sku"&gt;D-12w1&lt;/p&gt;
              &lt;p&gt;$ 2,410&lt;/p&gt;
              &lt;p class="location"&gt;north&lt;/p&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;div class="col-md-2 box"&gt;
          &lt;center&gt;
            &lt;img src="http://via.placeholder.com/80x80" class="" alt=""&gt;
            &lt;p class="name"&gt;Hot Dog &lt;/p&gt;
            &lt;p class="sku"&gt;11&lt;/p&gt;
            &lt;p&gt;$ 2,410&lt;/p&gt;
          &lt;/center&gt;
        &lt;/div&gt;
        &lt;div class="col-md-2 box"&gt;
          &lt;center&gt;
            &lt;img src="http://via.placeholder.com/80x80" class="" alt=""&gt;
            &lt;p class="name"&gt;Hot Dog 2&lt;/p&gt;
            &lt;p class="sku"&gt;12&lt;/p&gt;
            &lt;p&gt;$ 2,4105&lt;/p&gt;
          &lt;/center&gt;
        &lt;/div&gt;
        &lt;div class="col-md-2 box"&gt;
          &lt;center&gt;
            &lt;img src="http://via.placeholder.com/80x80" class="" alt=""&gt;
            &lt;p class="name"&gt;Hot Dog 2233&lt;/p&gt;
            &lt;p class="sku"&gt;13&lt;/p&gt;
            &lt;p&gt;$ 2,4103&lt;/p&gt;
          &lt;/center&gt;
        &lt;/div&gt;
      &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>