Using object's method as callback function for $.post
<pre><code>$.Comment = function() {
  this.alertme = "Alert!";
}

$.Comment.prototype.send = function() {

  var self = this;
  $.post(
    self.url,
    {
      'somedata' : self.somedata
    },
    function(data, self) {
      self.callback(data);
    } 
  );

}

$.Comment.prototype.callback = function(data) {
  alert(this.alertme);
}
</code></pre>

<p>When I'm calling $.Comment.send() debugger is saying to me that <code>self.callback(data) is not a function</code></p>

<p>What am I doing wrong?</p>

<p>Thank you</p>
