寻找双幻灯片/轮播选项

发布于 2024-11-18 04:56:58 字数 1539 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

神魇的王 2024-11-25 04:56:58

大多数单个滑块都提供了控制滑块的方法。

例如,jQuery 循环插件(参见:http://jquery.malsup.com/cycle/),可以通过创建两个列表轻松完成,给它们相同的时间和速度,并像这样创建按钮:

<div id="gallery1">... slideshow images/divs here</div>
<div id="gallery1">... second slideshow images/divs here</div>
<div id="nextbutton">
   Next
</div>

在 js 中:

$(document).ready(function () {
    $("#gallery1").cycle();
    $("#gallery2").cycle();

    $("#nextbutton").click(function () { 
        $("#gallery1").cycle('next');
        $("#gallery2").cycle('next');
    });
});  

Most single sliders offer a way to control the sliders.

For example, the jQuery cycle plugin (See: http://jquery.malsup.com/cycle/), can easily be accomplished by creating two lists, giving them the same timings and speed, and create your buttons like this:

<div id="gallery1">... slideshow images/divs here</div>
<div id="gallery1">... second slideshow images/divs here</div>
<div id="nextbutton">
   Next
</div>

And in js:

$(document).ready(function () {
    $("#gallery1").cycle();
    $("#gallery2").cycle();

    $("#nextbutton").click(function () { 
        $("#gallery1").cycle('next');
        $("#gallery2").cycle('next');
    });
});  
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文