title: If a link is inside a parent element, how can i change the parent element's class?
body: <p>Basically, if my first <code>&lt;td&gt;</code>within my <code>&lt;tr&gt;</code> has an <code>&lt;a&gt;</code> element inside it, I need to change my <code>&lt;tr&gt;</code>. That's as best as I could explain it right now. Example code is below. I thought about using <code>document.links</code> but I don't know if that's the way to go. </p>
  
  <p>Before:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;td&gt;11001122334&lt;/td&gt; &lt;!-- Number will be a link once the page loads due to a browser extension --&gt;
      &lt;td&gt;Valid&lt;/td&gt;
      &lt;td&gt;Still Valid&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>After:</p>
  
  <pre><code> &lt;tr class="valid"&gt;
      &lt;td&gt;&lt;a href="#"&gt;11001122334&lt;/td&gt;&lt;/a&gt; &lt;!-- Number will be a link once the page loads due to a browser extension --&gt;
      &lt;td&gt;Valid&lt;/td&gt;
      &lt;td&gt;Still Valid&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>