2009-03-13 12 views

उत्तर

20

उस संदर्भ में, $(this)$('.theclass') का तत्व नहीं है। शायद तुम each उपयोग करना चाहते हैं:

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

मैं जानता हूँ कि इस सवाल का 7 साल पुराना है। बस अगर कोई इस प्रश्न पर आया, तो यहां उपयोग किए बिना समाधान है। 0: 3

$('.theclass').attr("title", function() { return $(this).attr("title") + "Appended text." }); 
संबंधित मुद्दे