I'm trying to set the value of a private variable through a module pattern. So what I'm saying is set $content to the value I'm passing to person.content. But this doesn't seem to work because when I do an alert on the value it gives me an undefined error.
$(document).ready(function(){
person.content = $('#content');
person.getContent();
});
// Person Module
var person = ( function(){
var $content;
function getContent(){
alert( 'content = '+$content.find(':first h2').text());
}
return {
content: $content,
getContent : getContent,
}
}( ) );