javascript – Skitter jQuery幻灯片 – 想要设置时间间隔
作者:互联网
我发现这个惊人的jQuery幻灯片名为Skitter.这很棒!所以我在我的最新项目中实现了它.是否可以改变两个图像之间的时间间隔.我搜索了他们网站和javascript文件中的每个位置.
在jquery.skitter.js页面下面有线条
interval: 2500,
interval_in_elements: 300, // Interval animation hover elements hideTools
interval_out_elements: 500, // Interval animation out elements hideTools
我更改了那些但是没有效果的那些.
我的代码
<script>
$(document).ready(function() {
var options = {};
if (document.location.search) {
var array = document.location.search.split('=');
var param = array[0].replace('?', '');
var value = array[1];
if (param == 'animation') {
options.animation = value;
}
else if (param == 'type_navigation') {
if (value == 'dots_preview') {
$('.border_box').css({'marginBottom': '40px'});
options['dots'] = true;
options['preview'] = true;
}
else {
options[value] = true;
if (value == 'dots') $('.border_box').css({'marginBottom': '40px'});
}
}
}
$('.box_skitter_large').skitter({interval: 3000});
$('.box_skitter_large').skitter(options);
// Highlight
$('pre.code').highlight({source:1, zebra:1, indent:'space', list:'ol'});
});
</script>
< div class="box_skitter box_skitter_large">
<ul>
<?php
$galClass = "cube,cubeRandom,block,cubeStop,cubeHide,cubeSize,horizontal,showBars,showBarsRandom,tube,fade,fadeFour,paralell,paralell,blind,blind,blindHeight,directionTop,directionBottom,directionRight,directionLeft,cubeStopRandom,cubeSpread";
$galClassArray = array_filter(explode(',',$galClass));
foreach($getall_img as $all_image)
{
if($all_image!='')
{
shuffle($galClassArray);
?>
<li>
<a href='<?php echo $all_image["img_link"];?>' target="_blank">
<img src="<?php echo $upload_path.$all_image["img_name"];?>" class="<?php echo $galClassArray[1];?>" width="950" height="320" />
</a>
<?php /*<div class="label_text"><p><?php echo $all_image["img_title"];?></p></div>*/?>
</li>
<?php
}
}
?>
</ul>
</div>
解决方法:
看起来这样做了:
$('.box_skitter_large').skitter({interval: 3000});
$('.box_skitter_large').skitter(options); // REMOVE THIS LINE TO PREVENT
// PREVIOUS CUSTOM SETTINGS
// OVERWRITE
标签:slideshow,javascript,jquery 来源: https://codeday.me/bug/20190901/1781843.html