I have the following two functions. One checks for a class and if none found it removes another class. The second function executes the first one with delay. Both work well, but instead of abrupt removal of a class I would like to fade it away gradually. Here’s what i have so far. Need to fadeOut .txtCCC.
function noExpand() {
exp = $("#prT span.ui-icon-triangle-1-s").size();
if (exp == 0) {
$("#prT td.txtCCC").removeClass("txtCCC");
}
}
$("#prT span.btn").bind("click",function() {
window.setTimeout(function(){
noExpand(); //execute load function
},1000);
});
Can’t seem to be able to integrate fadeOut…
Sure, it’s possible to animate
addClass,toggleClassandremoveClass. But you need the jQueryUI.http://jqueryui.com/demos/removeClass/