[jQuery] scope inside callback?

[jQuery] scope inside callback?


Could someone help me figure out how to load the total number
returned in the post request into the total variable of the object?
Currently, the value of this.total remains zero through the script
even though the post returns 12.
$(document).ready(function() {
function ajax_page(statsendpoint) {
this.total = 0;
    this.updtotal = function(response){
        this.total=response.totalnum;
    }
    this.load_pagination = function() {
        $.post(this.statsendpoint,{
                     rev_usr_user_id_reviewed: 5
                 }, this.updtotal,"json");
    }
}