我发现这个令人惊叹的jQuery幻灯片名为Skitter。这很棒!所以我在我的最新项目中实现了它。是否可以改变两个图像之间的时间间隔。我搜索了他们网站和javascript文件中的每个位置。 在jquery.skitter.js页面中有下面的行
间隔:2500,
interval_in_elements:300,//间隔动画悬停元素hideTools interval_out_elements:500,//间隔动画输出元素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>
答案 0 :(得分:5)
看起来这样做了:
$('.box_skitter_large').skitter({interval: 3000});
$('.box_skitter_large').skitter(options); // REMOVE THIS LINE TO PREVENT
// PREVIOUS CUSTOM SETTINGS
// OVERWRITE