Jquery 快速问题:滚动

发布于 2024-08-15 17:51:30 字数 432 浏览 4 评论 0原文

我正在一个网站上工作,演示位于此处:http://waterwing.waterwing.ca(请忽略其他两页,它们还远未完成)。

无论如何,主页上的可滚动效果很好,除了您在滚动窗格中单击的任何内容都会移动滚动条这一事实。我需要做到只有箭头才能移动滚动条。我还相信这只发生在 mac safari 和 mac firefox 中,因为 windows firefox 似乎没问题。

控制滚动条的 jquery 部分:

$("#flowpanes").scrollable({size: 1});

我只需要更改它,以便只有箭头可以控制移动,而不是 flowpanes div 内的任何内容。

谢谢

I am working on a site, the demo is located here: http://waterwing.waterwing.ca (Please ignore the other 2 pages, they are far from finished).

Anyways, The scrollable on the home page works fine except for the fact that anything you click within the scrollpane will move the scroller. I need to make it so that only the arrows will move the scroller. I also believe this is only happening in mac safari and mac firefox because windows firefox seems to be fine.

The piece of jquery controlling the scroller:

$("#flowpanes").scrollable({size: 1});

I just need to alter this so that only the arrows can control movement and not anything inside the flowpanes div.

Thanks

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

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

发布评论

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

评论(1

挽心 2024-08-22 17:51:30

您将需要向可滚动对象添加一些其他属性。完整的属性列表可以在此处找到。

我认为您正在寻找的是“可点击”的,并且应该将其设置为 false。如果您愿意,您还可以添加自定义的下一个和上一个课程。应该看起来像:

$("#flowpanes").scrollable({
    size: 1,
    clickable: false,
    nextPage: '.yourRightArrowClass',
    prevPage: '.yourLeftArrowClass'
});

不过,您可以尝试一下这些选项,看看什么对您有用。

You're going to want to add some other properties to the scrollable object. The whole list of properties can be found here.

I think the one you're looking for is 'clickable' and it should be set to false. You can also add custom next and previous classes if you so choose. Should look like:

$("#flowpanes").scrollable({
    size: 1,
    clickable: false,
    nextPage: '.yourRightArrowClass',
    prevPage: '.yourLeftArrowClass'
});

You can play with the options though and see what works for you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文