Thank you for the tutorial. Could you possibly answer this question?
// Class stuff above
fuction1 : function () { myelements.addEvent('click', this.function2);
},
function2 : function () { // "this" is the element from function1 this.getParent('div') // now I need to call another function // But since the scope is the element, I get an error // If I bind function two, // how can I gain access to the element? this.function3();
@Styks1987 Just make the element temporary global by using window.element as a reference instead of this.element. ;)
CommunistUnderground 3 months ago
Nice one,Subscribed.Please keep it up. :)
Arjun007ize 5 months ago
Thank you for the tutorial. Could you possibly answer this question?
// Class stuff above
fuction1 : function () { myelements.addEvent('click', this.function2);
},
function2 : function () { // "this" is the element from function1 this.getParent('div') // now I need to call another function // But since the scope is the element, I get an error // If I bind function two, // how can I gain access to the element? this.function3();
}
//Class stuff below
Thanks!
Styks1987 7 months ago