ok così mi ha funzionato:
codice:
var limit = 0;
function ajaxPageHome(l) {
if (l === '+') {
limit += 10;
} else {
limit -= 10;
}
$.ajax({
type: "GET",
dataType: "html",
url: "ajax_page_home.php",
data: "limit=" + limit,
success: function(response) {
$("#ajax_page_home").html(response);
history.pushState(null, null, null);
window.addEventListener("popstate", function(e) {
ajaxPageHome('-')
});
}
});
}
la devo un attimo sistemare, ma nel complesso funziona.
vi posto la fonte principale perchè il mio non è proprio il modo canonico di usare la cosa: http://stackoverflow.com/questions/1...te-not-working
ciao!