Calling an object after an ajax call returns
<p>I built the following object:</p>

<pre><code> var cls = {
    offset : 0,
    onSuccess : function(data) {
        alert(this.offset);
    }
};

$(document).ready(function(){
    $("form").submit(function() {
              $.post(
                  "/ajax",
                  {},
                   cls.onSuccess
               );
     });
});
</code></pre>

<p>When the ajax returns and <code>onSuccess</code> of <code>cls</code> is called then I get an alert of <code>undefined</code>.</p>

<p>If I just call <code>cls.onSuccess()</code> then the alert returns <code>0</code> ex expected. Any reason for this behavior?</p>
