Hi,
I am trying to access properties of a config object from within another object:
var myConfigObj = {
$myCachedSelector: $('#mySelector')
}
var myObj = {
$selector: myConfigObj.$myCachedSelector,
url: 'http://www.someurl.com/somepath'
}
$.each([ myObj, mySecondObj, myThirdObj ], function() {
this.$selector.load(this.url, function(){
//do something
});
When trying to use $selector in the each function then, it returns "undefined". Both objects are in the same scope, and I don't know what the problem is.