这是我在 stackoverflow 上发表的第一篇文章,所以请告诉我我的问题是否正确,以及我的术语是否有任何错误。谢谢。
我正在使用 jQuery 和 Cycle 插件。我有大约 18 张图像可以无延迟地旋转。您可以在此处查看此操作的工作示例:( http://dev.ctsciencecenter.org/freeze-frame/ )。
我正在尝试更改“速度”值,最终使用 jQuery UI slider ,但现在使用链接和 .click 函数。
这是循环函数:
$('#slideshow').cycle({
fx: 'none',
timeout: 1,
continuation: 1,
speed: 'fast'
});
我想在单击 ID 为 #example 的链接时将“速度”值更改为“慢”。
我真的很感谢您的帮助,您能告诉我“speed”和“fx”等属性的术语吗?这些称为“对象属性吗?”。
最佳答案
请告诉我这是否是您正在寻找的内容:
$(function () {
$('#slideshow').cycle({
fx: 'none',
timeout: 1,
continuation: 1,
speed: 'fast'
});
$('#example').click(function (e) {
e.preventDefault();
$('#slideshow').unbind();
$('#slideshow').cycle({
fx: 'none',
timeout: 1,
continuation: 1,
speed: 'slow'
});
});
});
关于javascript - 单击时更改 jQuery .cycle 函数值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22155163/