2009-03-13 6 views

답변

20

그 문맥에서 $(this)$('.theclass')의 요소가 아닙니다. 어쩌면 당신은 each를 사용하려면 :

$('.theclass').each(function() { 
    $(this).attr("title", $(this).attr("title") + "Appended text."); 
}); 
21

나는이 질문에 7 살 알고있다. 누군가이 질문을 발견 한 경우를 위해 다음을 사용하지 않고 해결책을 제시합니다.

$('.theclass').attr("title", function() { return $(this).attr("title") + "Appended text." }); 
관련 문제