I have a JS file with this object setup amount other objects.
if (!me) var me = {};
me.page = {
initialize:function( options ) {
var settings = $.extend({
error_module: $('#error-module'),
mainForm: $('form')
}, options);
},
pagemaker:function(){
var temp = settings.error_module
}
}
me.bla = {
// the scope of bla
}
if I call me.page.pagemaker() it can't find the settings variable. I don't want to make settings global I want it to be in scope with the object page. How can I make this work so var temp = settings.error_module is not undefined.
var me = me || {}