I have made a simple object
var myObject = {
formname: $('form'),
input: this.formname.find('input'),
init: function() {
console.log(myObject.input)
}
}
myObject.init();
But this does not work. I want to use my name property in name2 property. What is the best approach for sharing properties ? Do I have to use prototype instead ?