How can I call a function from an object in javascript, like for example in jquery you call myDiv.html() to get the html of that div.
So what I want is this to work :
function bar(){
return this.html();
}
alert($('#foo').bar());
this is a simplified example, so please don't say : just do $('#foo').html() :)