I have a PHP page which has a div, the div has a PHP includes which includes this file:
Use this instead of your code
var page = 1; $(document).on('click','.Button',function(){ $("#posts").load("miniBlog.php", function(response, status, xhr) { if (status == "error") { var msg = "Error!: "; alert(msg); } }); page++; });