<p>Unsure if I've phrased this correctly, but in the callback how do I reference the controls property of the base class?</p>

<p>This has been bugging me for some time and I usually work around it, but I'd be grateful if anybody can enlighten me on how I should do this properly.</p>

<pre><code>var base = function() {
    var controls = {};

    return {
        init: function(c) {
            this.controls = c
        },
        foo: function(args) {
            this.init(args.controls);
            $(this.controls.DropDown).change(function() {
                $(this.controls.PlaceHolder).toggle();
            });
        }
    }
};
</code></pre>

<p>Much Obliged,</p>

<p>Paul</p>

You need to leverage closures here.
```
```
var base = function() {
var controls = {};

return {
    init: function(c) {
            this.controls = c
    },
    foo: function(args) {
            this.init(args.controls);
            $(this.controls.DropDown).change(function(controls) {
                    return function(){
                        $(controls.PlaceHolder).toggle();
                    }
            }(this.controls));
    }
}
```
```
};