This is one of those problems that's been bothering me for a while but I always just worked around it without truly figuring out a proper solution... Apologies if it has been answered before but I couldn't find an answer. If at all possible I'd like to avoid refactoring the object literal pattern.
In the following example, I can't access NS.something and I'm not sure why...
var NS = {
something : 'abc',
init : function(){
NS.doSomething();
},
doSomething : function(){
$('.elements').jqueryPlugin({
pluginParameters: {
NS.something : 'xyz';
}
})
}
};
NS.init();