Is there a better way to do have multiple 'this' references inside an
addEvent function? Right now I'm using a variable called thisProxy to
refer the global this and the this inside the function will refer to
that instance. I don't want to use bind because I need them both. Is
there a more elegant method?

Here's an example:

var thisProxy = this;

$$(someClass).addEvent('click', function(){
        this.addClass('someOtherClass');
        thisProxy.someFunction();
});

Reply via email to