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(){
}
};

