jquery - appendTo does not work on ajaxForm in success: -


i want append quest1 #adder, 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 use .text or .html, want appendto.

does not work on chrome, ie, ff

thanks jean

.html() indeed overwrite html content #adder. if want append new stuff, use .append() instead.

ref.: .append(), .html()


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -