需要对以下代码进行哪些更改才能设置jQuery滑块的幻灯片暂停时间
What change needs to make to the following code to set slide pause time of a jQuery slider?
我在我的网站上使用一个jQuery图像滑块。以下是我为图像滑块编写的代码:
jQuery(document).ready(function ($) {
var _SlideshowTransitions = [
//Fade
{ $Duration: 1200, $Opacity: 2 }
];
var options = {
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
$AutoPlaySteps: 1, //[Optional] Steps to go for each navigation request (this options applys only when slideshow disabled), the default value is 1
$Idle: 3000, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
$SlideDuration: 500, //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500
$MinDragOffsetToSlide: 20, //[Optional] Minimum drag offset to trigger slide , default value is 20
//$SlideWidth: 600, //[Optional] Width of every slide in pixels, default value is width of 'slides' container
//$SlideHeight: 300, //[Optional] Height of every slide in pixels, default value is height of 'slides' container
$SlideSpacing: 0, //[Optional] Space between each slide in pixels, default value is 0
$DisplayPieces: 1, //[Optional] Number of pieces to display (the slideshow would be disabled if the value is set to greater than 1), the default value is 1
$ParkingPosition: 0, //[Optional] The offset position to park slide (this options applys only when slideshow disabled), default value is 0.
$UISearchMode: 1, //[Optional] The way (0 parellel, 1 recursive, default value is 1) to search UI components (slides container, loading screen, navigator container, arrow navigator container, thumbnail navigator container etc).
$PlayOrientation: 1, //[Optional] Orientation to play slide (for auto play, navigation), 1 horizental, 2 vertical, 5 horizental reverse, 6 vertical reverse, default value is 1
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
$Class: $JssorSlideshowRunner$, //[Required] Class to create instance of slideshow
$Transitions: _SlideshowTransitions, //[Required] An array of slideshow transitions to play slideshow
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
},
$BulletNavigatorOptions: { //[Optional] Options to specify and enable navigator or not
$Class: $JssorBulletNavigator$, //[Required] Class to create navigator instance
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
$AutoCenter: 1, //[Optional] Auto center navigator in parent container, 0 None, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
$Steps: 1, //[Optional] Steps to go for each navigation request, default value is 1
$Lanes: 1, //[Optional] Specify lanes to arrange items, default value is 1
$SpacingX: 10, //[Optional] Horizontal space between each item in pixel, default value is 0
$SpacingY: 10, //[Optional] Vertical space between each item in pixel, default value is 0
$Orientation: 1 //[Optional] The orientation of the navigator, 1 horizontal, 2 vertical, default value is 1
},
$ArrowNavigatorOptions: {
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
$Steps: 1 //[Optional] Steps to go for each navigation request, default value is 1
}
};
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
//responsive code begin
//you can remove responsive code if you don't want the slider scales while window resizes
function ScaleSlider() {
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
if (parentWidth)
jssor_slider1.$ScaleWidth(Math.min(parentWidth, 940));
else
window.setTimeout(ScaleSlider, 30);
}
ScaleSlider();
if (!navigator.userAgent.match(/(iPhone|iPod|iPad|BlackBerry|IEMobile)/)) {
$(window).bind('resize', ScaleSlider);
}
if (navigator.userAgent.match(/(iPhone|iPod|iPad)/)) {
$(window).bind("orientationchange", ScaleSlider);
}
//responsive code end
});
上面的代码对我来说非常完美。现在我想在这个代码中设置图像暂停时间。换句话说,我想设置滑块图像暂停的时间,滑块中的下一个图像将不会出现。在完成了这么长时间之后,图像滑块中的下一个图像应该会出现。
事实上,我对上面代码中默认设置的许多计时器值感到困惑。我无法准确地计算出我必须修改哪个参数才能设置图像暂停时间。所以请求你的帮助。
有人能帮助我对代码进行必要的修改并实现此功能吗?
如果你需要任何关于这个问题的进一步信息,请告诉我。
提前谢谢。
它看起来像
$Idle: 3000,
是代码。用你的价值换3000。3000以毫秒为单位。但我觉得你可能应该先阅读文档。
相关文章:
- jquery设置为使用参数运行
- Css order属性不't在Jquery设置时更新
- 通过jquery设置最小高度
- 使用jQuery设置HTML5属性值时出现问题
- 如何使用Ajax/jQuery设置cookie
- 通过jQuery设置转换值
- 如何从jQuery设置控制器或全局变量的属性
- javascript/jquery设置var未发生
- jQuery 设置和获取下拉列表和输入的本地存储数据
- 如何使用 jQuery 设置 .selectedIndex
- 使用 jquery 设置 Asp Label 控件的文本值
- 无法从jquery设置标签文本
- 如何使用Jquery设置按钮样式
- jQuery设置属性onclick所有元素,而不是使用内联JS
- 尝试使用jquery设置鼠标按下的时间来更改按钮触发器以控制音量滑块
- 无法使用jquery设置cookie
- 有没有一种快捷方式可以让我用javascript或jQuery设置对象的字段
- 使用Jquery设置页面加载的默认值(我使用的是multiselect插件)
- 单击JQuery设置布尔标志
- textarea根据内容js或jquery设置高度