开发者

JQuery Tools Scrollable: On Click, stop scrolling?

开发者 https://www.devze.com 2022-12-19 08:59 出处:网络
I am using the scrollable plugin,开发者_开发技巧 excellent stuff and works the way I want. The only thing I want to change is the following:

I am using the scrollable plugin,开发者_开发技巧 excellent stuff and works the way I want.

The only thing I want to change is the following:

I have a list of linked images that scroll. When I click on an image, the scroller still scrolls and looks a bit odd. How do I stop it when a user clicks on a link?

$("#scroller").scrollable().circular().autoscroll({autoplay: true, steps: 1});

Thanks in advance for your help.

EDIT

Tried this code as suggested by Patrick, doesn't seem to work.

$("#scroller").scrollable().circular().autoscroll({autoplay: true, steps: 1});

$('#scroller .box').click(function()
{
      $("#scroller").stop();
});


Solved it;

$("#scroller").scrollable({clickable: false}).circular().autoscroll({autoplay: true, steps: 1});
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号