You could put a clone on top of it and fade the original out while fading the clone in.
After the fades are done, you could switch back to the original element... make sure to do this in the fades callback!
The example code below will keep fading between the two classes on each click:
$(function(){
var $mytd = $('#mytd'), $elie = $mytd.clone(), os = $mytd.offset();
// Create clone w other bg and position it on original
$elie.toggleClass("class1, class2").appendTo("body")
.offset({top: os.top, left: os.left}).hide();
$("input").click(function() {
// Fade original
$mytd.fadeOut(3000, function() {
$mytd.toggleClass("class1, class2").show();
$elie.toggleClass("class1, class2").hide();
});
// Show clone at same time
$elie.fadeIn(3000);
});
});
.toggleClass()
.offset()
.fadeIn()
.fadeOut()