Javascript 在脚本中添加fadeTo方法
我想将fadeTo添加到此代码段中。当Javascript 在脚本中添加fadeTo方法,javascript,jquery,Javascript,Jquery,我想将fadeTo添加到此代码段中。当此添加类当前时,我希望它淡入。但我不知道如何解决,也不知道我必须把fadeTo()放在哪里参数 $(this).bind("click", function() { navClicks++; $(this).addClass('current').parents('ul').find('a').not($(this)).removeClass('current'); offset = -
此
添加类当前
时,我希望它淡入。但我不知道如何解决,也不知道我必须把fadeTo()放在哪里代码>参数
$(this).bind("click", function() {
navClicks++;
$(this).addClass('current').parents('ul').find('a').not($(this)).removeClass('current');
offset = - (panelWidth*z);
alterPanelHeight(z);
currentPanel = z + 1;
$('.panel-container', slider).animate({ marginLeft: offset }, settings.slideEaseDuration, settings.slideEaseFunction);
if (!settings.crossLinking) { return false }; // Don't change the URL hash unless cross-linking is specified
});
我不确定您要查找的是哪个DOM元素fadeTo()
,但看看这个JSFIDLE:
我有一个类“current”,我在单击时添加它。在你的例子中,“点击我”和我想淡入你的“点击我”文本的绿色慢慢。。。别提皮卡丘