【发布时间】:2014-03-07 01:04:25
【问题描述】:
更新:想通了...更新的解决方案适用于每个可见的元素。
$('.effect-fade-ttb').waypoint(function() {
var $this = $(this);
setTimeout(function() {
$this.addClass('animate-fade-ttb');
}, $this.data('delay'));
}, {
offset: '80%',
triggerOnce: true
});
获得动画的部分具有数据延迟属性。
<div data-delay="500" class="effect-fade-rtl animate animate-fade-rtl">
<div class="serviceBoxWrapper">
<div style="background: #000000" class="serviceboxIconHolder">
<span class="fa fa-glass"></span>
</div>
<div class="serviceboxContent">
<h3>Fade RTL</h3>
</div>
</div>
</div>
我试图弄清楚如何使用数据延迟值来设置延迟。因为这是根据短代码选项动态添加的。
【问题讨论】:
标签: jquery jquery-animate wordpress-theming jquery-waypoints animate.css