How do I get jquery to stop replacing text from an ajax request.
var nameid = 1;
$(document).ready(function(){
$('button').click(function(){
$('#loadbox').load('mysqlquery.php?id='+nameid);
nameid++;
});
});// DONT DELETE
It pulls the info I want just when I make another call it replaces the previous word.
Don’t use
.load().. usejQuery.get()docs for the AJAX part and.append()docs to add them to the element you want (while preserving the existing info)(also you can indent you code to avoid comment like
// DONT DELETE)