I've got a <td>
. It has a class applied which specifies a background color. Can I fade-in to a different class, which just has a different background color? Something like:
// css
.class1 {
background-color: red;
}
.class2 {
background-color: green;
}
$('#mytd').addClass('green'); // <- animate this?
Thanks
The jQuery fadeIn() method is used to fade in a hidden element. Syntax: $(selector). fadeIn(speed,callback);
In android, Fade In and Fade Out animations are used to change the appearance and behavior of the objects over a particular interval of time. The Fade In and Fade Out animations will provide a better look and feel for our applications.
jQueryUI extends the animate class for this reason specifically. You can leave off the original parameter to append a new class to your object.
$(".class1").switchClass("", "class2", 1000);
Sample here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With