var quiz = {
config : {
qType : $j('#questionTypeDdown')
},
data : {
qType : 'test'
},
init: function() {
quiz.assignUIActions();
},
assignUIActions : function() {
var c = quiz.config;
var d = quiz.data;
quiz.assignqType(c,d);
},
assignqType : function(c,d) {
console.log(c.qType);
console.log(d.qType);
}
};
$j(document).ready(function() { quiz.init(); });
console.log(c.qType) returns an empty jQuery object but
console.log(d.qType) returns the value 'test'
Please explain why this is happening and what is the right way to get reference to #questionTypeDdown.