Reputation: 22040
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
Upvotes: 0
Views: 203
Reputation: 2381
use append
, appendto
appends to the parameter.
http://api.jquery.com/appendTo/
Upvotes: 1