Object Oriented Problem
Object Oriented Problem
Hi all,
I am wondering how to do this:
- function MyObject(){
- this.callMe = function(){
- alert("I am called!");
- };
- $("#myButton").click(function(){
- // How can I call the above callMe function?
- // this.callMe(); // Not working
- // callMe(); // Not working
- });
- }
Error messages I am getting on above are:
- this.callMe(); is not a function
- callMe(); is not defined
Thanks
Mahesh