我使用的 JQ 环形交叉口插件来自:
http://fredhq.com/projects/roundabout/
已设置并运行 - 但正在努力让可 Hook 事件之一运行。 任何演示都没有真正的语法示例,因此这可能只是我的愚蠢。
我按如下方式启动环岛:
<script>
$(document).ready(function() {
$('#productRoundel').roundabout(
{
shape: 'tearDrop',
focusBearing: '5.0'
});
$("#productRoundel").roundabout.animationEnd(function() {
alert("hello");
});
});
</script>
谁能给我一个关于正确语法的指针,以在动画完成后触发事件,以便我可以获得当前幻灯片的 ID?
谢谢, 史蒂夫
最佳答案
免责声明:我尚未测试或使用此插件,但您应该能够绑定(bind)到事件来监听它。
<script>
$(document).ready(function() {
$('#productRoundel').roundabout(
{
shape: 'tearDrop',
focusBearing: '5.0'
});
$("#productRoundel").bind( 'animationEnd', function() {
alert("hello");
});
});
关于JQuery 环岛 - 每次环岛完成移动时获取所选 <lI> 的 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9101609/