Check for element equality in an animation function.
- by Zardoz
I have the the below code and would expect that in the first pass of the fadeTo function "yes" would be printed as those first two console logs tell me it is the same element. But it doesn't recognize them as equal. What do I miss here?
var tds = self.element.find("td:nth-child(" + (columnIndex + 1) + ")");
tds.fadeTo(options.columnFadeOutTime, 0, function() {
window.console.log(tds.first());
window.console.log($(this));
if ($(this) == tds.first()) {
window.console.log("yes");
}
else {
window.console.log("no");
}
}