title: How to filter elements with two select options?
body: <p>I am trying to work out why I am not able to select two level filter on this code:</p>
  
  <pre><code>a[data-gender=men][data-color=blue][data-color=red]
  </code></pre>
  
  <p>What I want to do is filtering the products by gender and two colors blue and red. Filtering by only one color or one gender is working fine.</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>// find elements
  $("a").each(function() {
    $(this).css('background', $(this).data("color"));
    $(this).text($(this).data("gender"))
  });
  $("a[data-gender=men][data-color=blue][data-color=red]").removeClass('zoomOut').addClass('zoomIn');</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>body {
    background: #20262E;
    padding: 20px;
  
  }
  
  .zoomOut{
  display:none;
  
  
  }
  .zoomIn{
  display:cell;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="green" data-size="s" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="yellow" data-size="s" data-gender="bi"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="black" data-size="s" data-gender="bi"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="l" data-gender="bi"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="khaki" data-size="l" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="green" data-size="l" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="green" data-size="l" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="green" data-size="l" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="bi"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="s" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="s" data-gender="men"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="grey" data-size="l" data-gender="bi"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="m" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="m" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="m" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="blue" data-size="m" data-gender="women"&gt;&lt;/a&gt;
  &lt;a role="button" class="btn btn-default zoomOut" data-color="red" data-size="m" data-gender="men"&gt;&lt;/a&gt;</code></pre>
  </div>
  </div>
  </p>