【发布时间】:2013-02-18 23:53:10
【问题描述】:
使用 twitter bootstrap.js 中的回调“slid”,我试图在从幻灯片转换到幻灯片后单独为片段设置动画:
<div class="carousel">
<div class="item active">
<img src="animatefirst.png">
<h1> second </h1>
<p> third <p>
</div>
<div class="item">
<img src="animatefirst.png">
<h1> second </h1>
<p> third <p>
</div>
<div class="item">
<img src="animatefirst.png">
<h1> second </h1>
<p> third <p>
</div>
</div>
如您所见,我想按顺序制作以下动画:
- img
- h1
- p
我该怎么做?
到目前为止,我能做的只有这些:
$('#carousel2').bind('slid', function(){
$('img').fadeIn();
});
但是上面的问题是它会在第一张幻灯片上同时淡入所有图像,“滑入”。有没有办法让我定位 div 中的图像并将它们一个一个淡入淡出?
【问题讨论】:
标签: javascript twitter-bootstrap callback carousel