我有这个
if(noDelay){
$(element).find("." + options.class).remove();
} else {
$(element).find("." + options.class).fadeOut().remove();
}
有没有办法可以避免重复句子,只在fadeOut()
满足给定条件时添加?
我不能移动fadeOut()
到链条的末端,这可能会使事情变得更容易。
我在想类似的东西
$(element).find("." + options.class).(if(noDelay) fadeOut()).remove();
在此先感谢,狮子座