$('#item').click(function() {
$.ajax({
url: 'server.php',
type: 'POST',
data : {temp : 'aValue'},
success: function(data) {
$(data).css('color', 'red').appendTo('#item');
}
});
});
The problem is here :
$(data).css('color', 'red').appendTo('#item');
while it does takes the data and works well with the appendTo() the css part is not applicable