I'm confused on how "this" works visavi jQuery bindings.
function Foo()
{
this.stuff = 0;
this.callback = function()
{
$(this).attr('src', '...'+this.stuff);
};
$('#image_id').load( this.callback );
}
For $("#image_id")... will the callback method be called?
For the callback method, will using "$(this)" act as if it was "$("#image_id")"? If so, how does the method know the difference between the image's "this" and the object's "this"? (to be exact, will it be able to access "this.stuff")
I'm sort of new the JS, but have knowledge of OOP via Java.