When attempting to modify two values within a paragraph using jQuery, I encountered an issue where only one value was successfully updated, leaving the other empty.
<div class="container">
<p class="lead custom_bg" id="comment"> updateme!
<code id="source"> updateme2!</code>
</p>
</div>
Utilizing jQuery ajax
success: function(response){
$('#comment').text(response['comment']);
$('#source').text(response['source']);
}
From my perspective, it appears that the .text attribute modifies all text within the specified paragraph.