I want to append quest1 to #adder, but just does not happen
$('#formnam').ajaxForm(function() {
var quest = $('#Text').attr('value');
var quest1 = '<div>'+$('#Text').attr('value')+'</div>';
$.ajax({
type: "post",
url: "submit.php",
data: "q="+quest,
success: function() {
$('#Adder').html(quest1);
}
});
});
It works if I use .text or .html, but I want appendTo.
Does not work on chrome, IE, ff
Thanks
Jean
.html()does indeed overwrite the html content from#Adder. If you want to append new stuff, use.append()instead.Ref.: .append(), .html()