$('#item').click(function() {
$.ajax({
url: 'server.php',
type: 'POST',
data : {temp : 'aValue'},
success: function(data) {
$(data).css('color', 'red').appendTo('#item');
}
});
});
The concern lies here:
$(data).css('color', 'red').appendTo('#item');
Although it successfully retrieves and appends the data using appendTo(), applying CSS to it is not effective.