That's great - thanks. The only question I have now is whether it
would be possible to modify a prototype somewhere/somehow to provide
this property automatically?
On Oct 5, 8:53 am, Suni <[EMAIL PROTECTED]> wrote:
> Your problem is that within the function you no longer have a
> reference to my
Your problem is that within the function you no longer have a
reference to myObj, since this no longer points to it. Try this trick
(works):
var myObj = {
foo : function() {
var that = this;
$("#myLink").click(function(){
that.bar();
});
},
bar : function(){
}
};
2 matches
Mail list logo