How to get the object reference inside a JQuery callback function?
<p>Let's say that we have a javascript object called aObject and the test() function is used as a callback function in JQuery</p>

<pre><code>var aObject = {
    aVariable : 'whatever value',
    test : function() {
        // Trying to access property. But doesn't work as expected since I am getting the DOM element, not the aObject reference
        var temp = this.aVariable;
    }
}

var anInstanceOfAObject = $.extend({}, aObject);

anInstanceOfAObject.someFunction = function () {
    // I have to put "this" in a variable since "this" in the context below refers to the DOM element, not the instance of the object
    var placeHolder = this;
    $('some random div.element').theJavascriptFunction({
        "theJavascriptCallbackFunction": placeHolder.test,
    });
}
</code></pre>

<p>Inside that test() function, normally the context of "this" is the DOM element. My question is how to reference aObject since we can't use "this" to reference it.</p>

<p>EDIT: I am not sure if the syntax above is the correct/preferred way to instantiate an Object. I see some examples using this syntax</p>

<pre><code>var aObject = function() {....
</code></pre>

<p>Please inform me if this seems to be relevant to the problem.</p>
