Using .text() to select a class but having issues with spaces within the html
<pre><code>$('li.' + $(this).text()).toggle(true);
</code></pre>

<p>This code is used to take from a subnav below.</p>

<pre><code>&lt;div class="subNav"&gt;
        &lt;ul&gt;
     &lt;li class="button"&gt;sun protective clothing&lt;/li&gt;
        &lt;/ul&gt;
 &lt;/div&gt;
</code></pre>

<p>These are products that will be visible.</p>

<pre><code>&lt;div class="sun-protective-clothing"&gt;&lt;/div&gt;
</code></pre>


