简体   繁体   English

jQuery Cycle2-如何调整自动高度选项?

[英]jquery cycle2 - how to adjust autoheight options?

I am using jQuery cycle2 to build a slideshow and am making use of the autoheight feature/plugin . 我正在使用jQuery cycle2来构建幻灯片,并正在使用autoheight功能/插件

I would like to shorten the animation time and looking at the jquery.cycle2.autoheight.js plugin code , I see: 我想缩短动画时间,并查看jquery.cycle2.autoheight.js插件代码 ,我看到:

$.extend($.fn.cycle.defaults, {
    autoHeight: 0, // setting this option to false disables autoHeight logic
    autoHeightSpeed: 250,
    autoHeightEasing: null
}); 

I am implementing Cycle2 via cdnjs as a CDN, so I can't edit the code directly, what would be the right way to override the autoHeightSpeed option? 我正在通过cdnjs作为CDN实现Cycle2,所以我无法直接编辑代码,重写autoHeightSpeed选项的正确方法是什么?

在加载循环插件之后,在加载自动高度插件之前,您可以设置默认值

$.fn.cycle.defaults.autoHeightSpeed = 432432;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM