title: How do I change the title of a link using jQuery
body: <p>Here is the code I have:</p>
  
  <pre><code>      $('#link').attr("href",link) 
        $('#link').text(text)
  </code></pre>
  
  <p>How do I change the title of a link using jQuery? I'm correctly changing the url, but I can't edit the text, what am I doing wrong?</p>
  
  <pre><code>&lt;a id="link" href="" target="_blank"&gt;text&lt;/a&gt;
  
  
  
   $('#link').attr("href",data[1].url) 
   $('#link').attr("title",data[1].title) 
  
  &lt;a href="http://link.com"&gt;title&lt;/a&gt;
  </code></pre>
  
  <p>I'm tring to simply change 2 things:</p>
  
  <ol>
  <li>url</li>
  <li>title (as show above)</li>
  </ol>
  
  <p>I'm able to change the link, but the title won't change. I'm selecting the wrong trhing. Therefor is there a way to list all attr available to me? Or are you able to help me change the text title above?</p>
  
  <p>Either answer is acceptable. </p>
  
  <pre><code>        &lt;div id="highlight" class="topicHighlight hero1"&gt;
              &lt;h3 id="h3"&gt;hero_1_large_text&lt;/h3&gt;
              &lt;p id="p"&gt;&lt;/p&gt;
                  &lt;span id="coverTextSpan"&gt;hero_1_small_text&lt;/span&gt;
                  &lt;a id="link" href="url" target="_blank"&gt;text&lt;/a&gt;
          &lt;/div&gt;
  </code></pre>