How in jQuery do append and not replace load ? load completely changes the div , and how to make it add to the end of the div without deleting the previous elements?

    2 answers 2

    If you need to load content into a block, not replacing its previous contents, but adding it, you need to send a request using the .get(...) method, like this

     $.get('page.html',function(data){ $('div').append(data); }); 
       $('div').append('somedata');