我正尝试用jQuery循环插件构建幻灯片放映。嵌套的jQuery循环?
在幻灯片放映中有内容,内部有基本的图片库。
图片库使用的周期超时少于内容超时。所以内容等待15秒,图片库将有5秒图片与3秒超时,这使得15秒内容改变。
一切听起来不错,但是当我执行页面时,它循环内容和第一个图像库。但是当它跳转到第二个内容时,它不会循环显示图片库。
我试图把$('#cycleImages').cycle({...
这个代码块上面的图片库中继器,但它没有工作。
我怎样才能让这些嵌套的周期一起工作? 谢谢
<head runat="server">
<script type="text/javascript" src="/Js/jquery-1.2.6.js"></script>
<script src="/Js/jquery.cycle.all.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#cycleContent').cycle({
fx: 'scrollRight',
delay: -1000,
timeout: 15000
});
});
$('#cycleImages').cycle({
fx: 'fade',
speed: 500,
timeout: 3000,
pause: 1
});
</script>
</head>
这是我的HTML标记
<div id="cycleContent">
<asp:Repeater ID="rptContent" runat="server">
<ItemTemplate>
<div>
<h2 class="slideShow-type">("Type.Name") %></h2>
<h2 class="slideShow-title">("Title") %></h2>
<div id="cycleImages">
<asp:Repeater ID="rptBigPictures" DataSource='<%#Eval("Images") %>' EnableViewState="false"
runat="server">
<ItemTemplate>
<asp:Image ID="imgProfile" runat="server" ImageUrl='<%#Eval("Path") + ".jpg" %>' />
</ItemTemplate>
</asp:Repeater>
</div>
</div>
</ItemTemplate>
</asp:Repeater>
</div>
谢谢我会尽快尝试 – 2009-02-17 17:08:53