Javascript 在脚本中添加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添加到此代码段中。当
添加类
当前
时,我希望它淡入。但我不知道如何解决,也不知道我必须把
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”,我在单击时添加它。在你的例子中,“点击我”和我想淡入你的“点击我”文本的绿色慢慢。。。别提皮卡丘