var displayMessage = function (objNotification) { this.hello = function () { alert('Condition met!'); } var json = JSON.parse(objNotification); //this is where I call my plugin where I pass a JSON object. I want to call the function hello in here? notification(json); };
hello = function() { alert("...");}hello(); // not this.hello();
this.hello()
someObject().hello()
someObject = "anything to initialize it";someObject.hello = function() { // yes, you can add any member to any object alert("...");};// ...someObject.hello(); // the call of the member function
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)