我希望有人可以帮我解决以下问题。
我的网站上有一个垂直滚动条,显示5张图像,可以进一步或向后滚动5张图像,取决于你点击的位置。
jQuery代码看起来像这样。
$(".productSlide .scrollable").scrollable();
$(".productSlide .scrollable").scrollable({ vertical: true, mousewheel: true });
我是jQuery的新手,我可以实现的目标是以下
<div class="scrollBlock">
<?php
for($i=0; $i<5; $i++)
include 'example1.php';
?>
</div>
<div class="scrollBlock">
<?php
for($i=0; $i<5; $i++)
include ' example1.php';
?>
</div>
<div class="scrollBlock">
<?php
for($i=0; $i<5; $i++)
include ' example1.php';
?>
</div>
在example1.php中有一个将显示5次的图像。每次点击你都会看到相同的div再次使用相同的5张照片。没有“scrollBlock”div,我无法想出这个。如何在一个区块中使用更多图片 - 它仍在滚动5个图像?
非常感谢!
答案 0 :(得分:0)
如果你想要一个水平滚动:
$(".scrollable").scrollable();
如果你想垂直滚动:
$(".productSlide .scrollable").scrollable({ vertical: true, mousewheel: true });
同时使用两个块,遗憾的是不要创建对角滚动:D
解决方案: 评论/删除首先“.scrollable”调用