如何在使用roundabout.js时了解StartChild

时间:2013-11-03 13:00:18

标签: javascript jquery html jquery-plugins

您好我正在使用这里显示的roundabout.js实现5个图像的环形交叉口 http://fredhq.com/projects/roundabout/demos/standard

所以我想知道当前的前映像,以便每当用户点击它时我都可以实现一些触发器。当用户点击前面图像后面显示的图像时,我不想启用触发器。

仅针对正面图像启动触发,并且后面的其余图像会发生自然行为。

我尝试在我的Html文件中使用roundabout_startChildren()函数,但无法知道如何正确使用此函数。

1 个答案:

答案 0 :(得分:2)

注意: - 我从来没有使用过这个插件,所以如果您认为我误解了您的问题,请不要投票给答案,而是纠正我

here is the DEMO

在页面加载时切换所有可移动元素的click off,并在点击的元素on hasClass然后{{1}时切换roundabout-in-focus }

animateToNextChild

按照评论

中提到的要求进行编辑

DEMO

$('ul').roundabout()
$('ul li').off('click');

$('.roundabout-moveable-item').click(function(e){


if($(this).hasClass('roundabout-in-focus'))
{


    $(this).on('click')
    $('ul').roundabout("animateToNextChild")

}
})