Append text to an attribute rather than replacing it?
<p>I want to append some text to the title attribute of all elements of a certain class. This works to replace the text:</p>

<pre><code>$('.theclass').attr("title", "Replaced text.");
</code></pre>

<p>It seemed logical that this would do the trick:</p>

<pre><code>$('.theclass').attr("title", $(this).attr("title") + "Appended text.");
</code></pre>

<p>But instead I end up with an empty title attribute. Any ideas?</p>
