I am trying to use a jQuery function on a property of my js object, but it's giving me an error "Uncaught TypeError: Cannot read property 'jquery' of undefined". Here is some sample code:
var foo = {
bar: $('#element'),
baz: this.bar.find('#childelement'), // <- jQuery .find() not working
hideBaz: function() {
this.baz.hide();
}
}
Not really sure what to do here, any help would be great