So I have this code:
function theObject(){
this.someelement = $("#someelement");
this.someotherelement = $("someotherelement");
this.someelement.fadeOut(500, function(){
this.someotherelement.attr("title", "something");
this.someelement.fadeIn(500);
});
}
for some reason this.someotherelement is undefined. I'm guessing because it's wrapped in a function(){}?
thisrefers tothis.someelement(actually to its DOM element). With most (every?) jQuery function that takes a callback,thisrefers to the (DOM) element you call the function on.