jQuery Roundabout:更改显示的项目数量
我正在使用 jQuery Roundabout 插件。我想知道是否有办法选择显示的图片数量。我有十张图片,但只有其中三张应该可见,如“方形”示例中的第二个(扩展)链接所示。
这怎么可能?
编辑更多信息:
jquery roundabout-plugin: http://frdhq.com/projects/roundabout
和扩展: http://frdhq.com/projects/roundabout-shapes/
->我想要“方形”
相关代码:
<head>
<style>
.roundabout-holder {
list-style: none;
padding: 0;
margin: 0 auto;
text-align: center;
height: 500px;
width: 300px;
}
.roundabout-moveable-item {
cursor: pointer;
border: 1px solid #999;
bottom: 0;
}
.roundabout-in-focus {
cursor: auto;
}
</style>
<script type="text/javascript" src="../../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../js/jquery.roundabout.js"></script>
<script type="text/javascript" src="../../js/jquery.roundabout-shapes.js"></script>
<script>
$(document).ready(function() {
$('ul.roundabout-holder').roundabout({
shape: 'square',
btnNext: ".next",
btnPrev: ".prev",
btnStopAutoplay: ".stop",
btnStartAutoplay: ".start",
duration: 1000,
autoplay: true,
autoplayDuration: 4000,
autoplayPauseOnHover: true,
reflect: false,
minOpacity: 0.5,
minScale: 0.1
});
});
</script>
</head>
<body>
<ul class="roundabout-holder">
<li class="roundabout-moveable-item"><a href="img/hauptbild-gross.jpg"><img src="img/hauptbild.jpg" width="466" height="500" /></a></li>
<li class="roundabout-moveable-item"><a href="img/baerenfamilie-gross.jpg"><img src="img/baerenfamilie.jpg" width="400" height="196" /></a></li>
<li class="roundabout-moveable-item"><a href="img/hamster-bleistift-gross.jpg"><img src="img/hamster-bleistift.jpg" width="400" height="351" /></a></li>
<li class="roundabout-moveable-item"><a href="img/hamster-schlafend-gross.jpg"><img src="img/hamster-schlafend.jpg" width="400" height="302" /></a></li>
<li class="roundabout-moveable-item"><a href="img/hamster-schmetterling-gross.jpg"><img src="img/hamster-schmetterling.jpg" width="400" height="374" /></a></li>
<li class="roundabout-moveable-item"><a href="img/hase-gross.jpg"><img src="img/hase.jpg" width="384" height="500" /></a></li>
</ul>
</body>
</html>
这是项目网址: http://www.eyes-on-fire.de /test/2/portfolio/tiere/index.php
(作为新手,我不被允许发布三个链接)
I am using the jQuery Roundabout plugin. I am wondering if there is a way to choose the number of pictures that are shown. I have ten pictures, but only three of them should be visible as shown in the second (extention) link within the "square" example.
How is that possible?
Edit with further information:
jquery roundabout-plugin: http://fredhq.com/projects/roundabout
and extension: http://fredhq.com/projects/roundabout-shapes/
-> I would like to have the "square shape"
relevant code:
<head>
<style>
.roundabout-holder {
list-style: none;
padding: 0;
margin: 0 auto;
text-align: center;
height: 500px;
width: 300px;
}
.roundabout-moveable-item {
cursor: pointer;
border: 1px solid #999;
bottom: 0;
}
.roundabout-in-focus {
cursor: auto;
}
</style>
<script type="text/javascript" src="../../js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="../../js/jquery.roundabout.js"></script>
<script type="text/javascript" src="../../js/jquery.roundabout-shapes.js"></script>
<script>
$(document).ready(function() {
$('ul.roundabout-holder').roundabout({
shape: 'square',
btnNext: ".next",
btnPrev: ".prev",
btnStopAutoplay: ".stop",
btnStartAutoplay: ".start",
duration: 1000,
autoplay: true,
autoplayDuration: 4000,
autoplayPauseOnHover: true,
reflect: false,
minOpacity: 0.5,
minScale: 0.1
});
});
</script>
</head>
<body>
<ul class="roundabout-holder">
<li class="roundabout-moveable-item"><a href="img/hauptbild-gross.jpg"><img src="img/hauptbild.jpg" width="466" height="500" /></a></li>
<li class="roundabout-moveable-item"><a href="img/baerenfamilie-gross.jpg"><img src="img/baerenfamilie.jpg" width="400" height="196" /></a></li>
<li class="roundabout-moveable-item"><a href="img/hamster-bleistift-gross.jpg"><img src="img/hamster-bleistift.jpg" width="400" height="351" /></a></li>
<li class="roundabout-moveable-item"><a href="img/hamster-schlafend-gross.jpg"><img src="img/hamster-schlafend.jpg" width="400" height="302" /></a></li>
<li class="roundabout-moveable-item"><a href="img/hamster-schmetterling-gross.jpg"><img src="img/hamster-schmetterling.jpg" width="400" height="374" /></a></li>
<li class="roundabout-moveable-item"><a href="img/hase-gross.jpg"><img src="img/hase.jpg" width="384" height="500" /></a></li>
</ul>
</body>
</html>
And here is the project-url:
http://www.eyes-on-fire.de/test/2/portfolio/tiere/index.php
(I wasn't allowed to post three links as a newbie)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无需过多讨论细节:
应该可以解决问题。
这个想法是根据您的容器宽度/高度(如果适用)调整
minScale
和maxScale
,以便您准确地看到您想要查看的图像/幻灯片的数量。Without going too much into detail:
should do the trick.
The idea is to adjust the
minScale
andmaxScale
according to your container width / height as applicable so that you see exactly the number of images / slides that you want to see.