title: Change the error message in a SPAN using JavaScript/jQuery
body: <p>I want to change the message in a <code>&lt;span&gt;</code> using JavaScript/jQuery.</p>
  
  <pre><code>&lt;span id="access-code-error" class="rsvp required-fields"&gt; &lt;/span&gt;
  </code></pre>
  
  <p>I am using the following code to replace the text which will be added to this <code>&lt;span&gt;</code>:</p>
  
  <pre><code>$("span:contains('I need &lt;br&gt;this text to be replaced')").text( "hello&lt;br&gt; How r u" );
  </code></pre>
  
  <p>But this isn't working. What do I need to do differently?</p>