我需要将每个名为 transparent.png 的图像依次脉动(或淡入、淡出)3 次,而不是像现在这样在同一时间。
transparent.png 位于每个图像的顶部并提供淡出效果。
我用:
- jQuery 1.7.2
- jQuery UI 1.8.21
这是我的代码:
jQuery('.transparent').each(function(index) {
jQuery(this).effect("pulsate", {times:3}, 1000);
});
<div id="content">
<a class="frontimage projectleft" href="?folder=/sculptures">
<img width="200" title="" alt="" src="0054_46.jpg">
<img width="200" title="" alt="" src="transparent.png" class="transparent" style="opacity: 1; display: block;">
</a>
<a class="frontimage projectleft" href="?folder=/furniture">
<img width="200" title="" alt="" src="0076_20.jpg">
<img width="200" title="" alt="" src="transparent.png" class="transparent" style="opacity: 1;">
</a>
<a class="frontimage projectright" href="?folder=/paintings">
<img width="200" title="" alt="" src="156_52.jpg">
<img width="200" title="" alt="" src="transparent.png" class="transparent" style="opacity: 1;">
</a>
<a class="frontimage projectleft" href="?folder=/sculptures">
<img width="200" title="" alt="" src="174_36.jpg">
<img width="200" title="" alt="" src="transparent.png" class="transparent" style="opacity: 1;">
</a>
<a class="frontimage projectleft" href="?folder=/furniture">
<img width="200" title="" alt="" src="276_1.jpg">
<img width="200" title="" alt="" src="transparent.png" class="transparent" style="opacity: 1;">
</a>
<a class="frontimage projectright" href="?folder=/paintings">
<img width="200" title="" alt="" src="290_200076-01.jpg">
<img width="200" title="" alt="" src="transparent.png" class="transparent" style="opacity: 1;">
</a>
</div>