How to perform ajax but not update content of the div so add?

0

I have <div> where the return of the function ajax is returned, but it updates itself, I want to know if it has the function ajax and instead of updating it to bring the result leaving the old result, it is possible?

HTML

<div id="id">

</div>

Ajax

  $.ajax({
         url:'enviar.php',
         method:'POST',
         data:{nome:nome, texto:texto},
         beforeSend: function(){
          $("#id").html("...");
         }
         success:function(data){
          $("#id").html(data)
         }

        });
    
asked by anonymous 08.01.2018 / 19:47

1 answer

1

You only need to change $("#id").html(data) to $("#id").append(data) .

    
09.01.2018 / 13:29