怎么在这个JQ轮播上加自动滚动
HTML:<divclass="picScroll"><divclass="title10">{tag_首页第四行栏目}</div><!--<divclass="t_1"...
HTML:
<div class="picScroll">
<div class="title10">{tag_首页第四行栏目}</div>
<!--<div class="t_1">{tag_首页第四行栏目}</div>-->
<ul class="clear list_img_1">
{tag_首页第四行栏目图片6条}
</ul>
<a class="prev" href="javascript:void(0)"></a>
<a class="next" href="javascript:void(0)"></a>
</div>
<!-- 滚动图片 -->
<script type="text/javascript">
jQuery(".picScroll").slide({ mainCell:"ul", effect:"leftLoop", vis:4, scroll:2, autoPage:true, switchLoad:"_src" });
</script>
<div class="blank30"></div>
</div>
CSS:
/* ======= 滚动图片 =========*/
.picScroll{ margin:0px auto; position:relative; width:990px; padding:10px 0 10px 0px;overflow:hidden; }
.picScroll .prev,
.picScroll .next{ display:block; position:absolute; top:100px;_top:25%; margin-top:11px; left:5px; width:50px; height:50px; background:url(../images/base/btns.png) no-repeat; }
.picScroll .next{ left:auto; right:5px; background-position:-50px 0; }
.picScroll .prev:hover{ background-position:0 -50px; }
.picScroll .next:hover{ background-position:-50px -50px; }
.picScroll ul{ overflow:hidden; zoom:1; }
.picScroll ul li{float:left; overflow:hidden;margin-left:5px;}
.picScroll ul li img{width:240px;}
/*/滚动图片*/ 展开
<div class="picScroll">
<div class="title10">{tag_首页第四行栏目}</div>
<!--<div class="t_1">{tag_首页第四行栏目}</div>-->
<ul class="clear list_img_1">
{tag_首页第四行栏目图片6条}
</ul>
<a class="prev" href="javascript:void(0)"></a>
<a class="next" href="javascript:void(0)"></a>
</div>
<!-- 滚动图片 -->
<script type="text/javascript">
jQuery(".picScroll").slide({ mainCell:"ul", effect:"leftLoop", vis:4, scroll:2, autoPage:true, switchLoad:"_src" });
</script>
<div class="blank30"></div>
</div>
CSS:
/* ======= 滚动图片 =========*/
.picScroll{ margin:0px auto; position:relative; width:990px; padding:10px 0 10px 0px;overflow:hidden; }
.picScroll .prev,
.picScroll .next{ display:block; position:absolute; top:100px;_top:25%; margin-top:11px; left:5px; width:50px; height:50px; background:url(../images/base/btns.png) no-repeat; }
.picScroll .next{ left:auto; right:5px; background-position:-50px 0; }
.picScroll .prev:hover{ background-position:0 -50px; }
.picScroll .next:hover{ background-position:-50px -50px; }
.picScroll ul{ overflow:hidden; zoom:1; }
.picScroll ul li{float:left; overflow:hidden;margin-left:5px;}
.picScroll ul li img{width:240px;}
/*/滚动图片*/ 展开
1个回答
展开全部
看代码的格式是使用的jquery superslide插件,直接添加一个autoPlay:true参数就行了; JS部分的修改如下:
<!-- 滚动图片 -->
<script type="text/javascript">
jQuery(".picScroll").slide({
mainCell:"ul",
effect:"leftLoop",
vis:4,
scroll:2,
autoPage:true,
switchLoad:"_src",
autoPlay:true
});
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询