I've code like the following:
function tell(){
console.log(this==window);//true
console.log($(el).html());
}
$('.elem').click(function(){
el=this;
console.log($(this).html());
tell();
});
I want to know why tell()
s this
is not this
from the click event handler anonymous function?