title: How to filter html table td attribute?
body: <p>I want to filter the td attribute in my HTML table, but it does not return any results. I just want to show the tr data-value attribute that contains the value. does not return the result as I want now</p>
  
  <p>"I am sorry for this English"</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>function Search() {
    var value = $('#searchbar-4').val().toLowerCase();
    if (value != "") {
      $("#grid-4 tbody tr").each(
        function() {
          var r = $(this).find("td[data-value*='" + value + "']");
          if (r &gt; -1) {
            $(this).show();
          } else {
            $(this).hide();
          }
        });
    } else {
      ...
    }
  };</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;table id="tb1" class="all-table"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th class="td-fixed"&gt;Facility name&lt;/th&gt;
        &lt;th class="td-fixed2"&gt;Phone #&lt;/th&gt;
        &lt;th&gt;City&lt;/th&gt;
        &lt;th&gt;Speciality&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;tr&gt;
        &lt;td data-value="5" class="td-fixed"&gt;CCC&lt;/td&gt;
        &lt;td data-value="4" class="td-fixed2"&gt;00001111&lt;/td&gt;
        &lt;td data-value="2"&gt;Amsterdam&lt;/td&gt;
        &lt;td data-value="6"&gt;GGG&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td data-value="8" class="td-fixed"&gt;JJJ&lt;/td&gt;
        &lt;td dat-value="9" class="td-fixed2"&gt;55544444&lt;/td&gt;
        &lt;td data-value="55"&gt;London&lt;/td&gt;
        &lt;td data-value="15"&gt;MMM&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td data-value="14" class="td-fixed"&gt;AAA&lt;/td&gt;
        &lt;td data-value="19" class="td-fixed2"&gt;33332222&lt;/td&gt;
        &lt;td data-value="20"&gt;Paris&lt;/td&gt;
        &lt;td data-value="18"&gt;RRR&lt;/td&gt;
      &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>