title: replace anchor text with jquery
body: <p>i want to replace the text of a html anchor:</p>
  
  <pre><code>&lt;a href="index.html" id="link1"&gt;Click to go home&lt;/a&gt;
  </code></pre>
  
  <p>now i want to replace the text 'click to go home'</p>
  
  <p>i've tried this:</p>
  
  <pre><code>alert($("link1").children(":first").val());
  alert($("link1").children(":first").text());
  alert($("link1").children(":first").html());
  </code></pre>
  
  <p>but it all gives me null or an empty string</p>