I am trying to create a loop that each time, retrieves another pages' content via `$.post` and upon completion, does the next page, until an element on that page shows 0 results.

```
function scrapeIt() {
    $(".currentPage").html("Current Page: " + page);
    $.post("scrapePosts.aspx", { page: page, search: keyword }, function (data) {
        $(".status").html(data);
        if ($("#count").html() == "10") {
            scrapeIt();
        } else {
            alert("Stopping...");
        }
    });
    page++;
}

$(document).ready(function () {
    var page = 1;
    var keyword;
    var stillGettingResults = true;

    $("#go").click(function () { //Start Button
        keyword = $("#keyword").val(); // Textbox
        $(".status").html("Loading...");
        scrapeIt();
    });
});

```

The idea was for the `scrapeIt()` function to call itself again, but only when it has completed the post request. It seems to just freeze though.