title: Wrapping text with a span, using waitForKeyElements, is killing the styling?
body: <p>I am using Greasemonkey and <code>waitForKeyElements()</code> to change some text in a webpage.</p>
  
  <p>Here is an example of a single jNode element.</p>
  
  <pre><code>&lt;div class="Ov-h Mx-a"&gt;
      &lt;div&gt;
          &lt;div class="Grid-bind-end"&gt;
              &lt;div class="ysf-player-name Nowrap Grid-u Relative Lh-xs Ta-start"&gt;
                  &lt;a class="Nowrap" href="http://sports.yahoo.com/nfl/players/7206" target="sports"&gt;H. Miller&lt;/a&gt; &lt;span class="Fz-xxs"&gt;Pit - TE&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
          &lt;div class="Grid-bind-end"&gt;
              &lt;span class="ysf-player-status F-injury Fz-xxs Grid-u Lh-xs"&gt;&lt;/span&gt;
  
              &lt;div class="ysf-player-detail Nowrap Grid-u Fz-xxs Lh-xs Ta-start"&gt;
                  &lt;span class="ysf-game-status"&gt;&lt;a class="F-reset" href="http://sports.yahoo.com/nfl/pittsburgh-steelers-new-england-patriots-20150910017/" onclick="pop(this)" target="sports"&gt;Thu 5:30 pm @ NE&lt;/a&gt;&lt;/span&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to change <code>Thu 5:30 pm @ NE</code> to <code>Thu 5:30 pm @ &lt; span class="color"&gt;NE - [rank]&lt;/span&gt;</code> (Note that [rank] is a variable I have)</p>
  
  <p>Here is what I have tried</p>
  
  <pre><code>jNode.text((jNode.text().replace("NE","&lt;span class='color'&gt;NE - [rank]&lt;/span&gt;")))
  </code></pre>
  
  <p>But this makes the element lose it's styling.</p>