title: Hide a class if the text in another class contains . . .
body: <p>I am working with a form that has multiple steps, I would like to hide a span of text that has class .newtest applied to it if another class, .RegCurrent contains the text "Step 1 Selection".</p>
  
  <pre><code>&lt;ol class="steps"&gt;
  &lt;li class="RegCurrent"&gt;Step 1 Selection&lt;/li&gt;
  &lt;li class="notcurrent"&gt;Step 2 Selection&lt;/li&gt;
  &lt;li class="notcurrent"&gt;Step 3 Selection&lt;/li&gt;
  &lt;/ol&gt;
  
  &lt;div class="singleCol"&gt;
  &lt;span class="newtest"&gt;
  &lt;h1&gt;some text&lt;/h1&gt;
  &lt;p&gt;some more text&lt;/p&gt;
  &lt;/span&gt;
  &lt;p&gt;some text and tables&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I have tried:</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function() {
  if( $('.RegCurrent:contains("Step 1 Selection")') {
  $('.newtest').hide();
  }
  });
  &lt;/script&gt;
  </code></pre>