event.data.self.anotherMethod(); This is an instance call.
The above is extremely useful when writing good OO code in JavaScript. I really don't like having to do the following, in my code:
ClassName.prototype.anotherMethod(); This is a static call.
This is very ugly in my opinion. I realize that JavaScript is not an OO language like Java or Python, etc, but I feel this is still a better option than a static call to the method.
So I guess what I am asking is, is it possible to allow something like this as an argument in your modal options for example?
jQuery itself when binding a function/method to an object allows you to pass in arbitrary objects in the 2nd argument as in:
$('#someId').bind('click', {self: this}, this.method);
event.data.self.anotherMethod();
This is an instance call.ClassName.prototype.anotherMethod();
This is a static call.Carl