I want to append some text to the title attribute of all elements of a certain class.
In that context, $(this) is not the element of $('.theclass'). Maybe you want to use each:
$(this)
$('.theclass')
$('.theclass').each(function() { $(this).attr("title", $(this).attr("title") + "Appended text."); });