事件未触发(或格式正确)后的FlexSlider [英] FlexSlider after event not firing (or correctly formed)

查看:111
本文介绍了事件未触发(或格式正确)后的FlexSlider的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Flexslider为一系列滚动幻灯片制作动画.可以正常工作了.我现在想做的是利用"after:"回调在幻灯片的标题中淡入淡出.就运行顺序而言,它看起来像这样:

I'm using Flexslider to animate a series of rolling slides. It's in and working just fine. What I'm now wanting to do is make use of the 'after:' callback to fadeIn the headline within the slide. In terms of a run order it would look something like this:

  1. 幻灯片(包含背景图片)会淡入.
  2. 暂停(1秒).
  3. 标题淡入.

我在'after:'事件旁边使用了以下函数,您是否不知道呢,它不起作用.标题已设置为显示:无;但从不显示(是的,我的时机还不错).

I'm using the following function alongside the 'after:' event and wouldn't you know it, it's not working. The headline has been set to display: none; but never shows (and yes, my timing is fine).

after: function(){$('.headline').fadeIn(500);},

HTML:

<li>
    <div class="slide">
            <div class="headline">Headline text goes here</div>
    </div>
</li>

指导将不胜感激.

谢谢, @rrfive

Thanks, @rrfive

推荐答案

您错过了函数调用中的'slider'对象:

you missed 'slider' object in your function call:

after: function(slider){
//do your stuff here
}

还需要通过这种方式指定要淡入的.headline元素:

It's also necessary specify which of .headline elements you want to fadeIn by this way:

after: function(slider){
 curSlide = slider.slides[slider.currentSlide];
 $(curSlide).find('.headline').fadeIn(500);
}

查看woothemes家伙提供的文档,您将找到所需的一切. 如果您有问题,请在这里答复. 最好的问候

Check the documentations given by woothemes guys, you will find all you need. If you have problems reply here. Best regards

这篇关于事件未触发(或格式正确)后的FlexSlider的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆