我有一个使用slick.js的轮播,我的工作方式是显示图像1秒钟,然后移到下一张幻灯片,该幻灯片会自动播放视频,完成后会移动到下一张幻灯片一张图片...我的问题是,当幻灯片循环回到第一个幻灯片时,它将停止自动播放,并且在第一个循环之后仅“粘”在第一张幻灯片上。如何获取滑块以不断浏览幻灯片?
这是我现在拥有的js:
jQuery(function($){
var slider = $('.homeslider');
slider.slick({
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
fade: true,
autoplay: true,
autoplaySpeed: 100,
infinate: true,
loop: true,
});
slider.on('afterChange', function(event, slick, currentSlide) {
var vid = $(slick.$slides[currentSlide]).find('video');
if (vid.length > 0) {
slider.slick('slickPause');
$(vid).get(0).play();
}
});
var durationList = $('.slider__item').map(function(index, item) {
return item.getAttribute('data-time');
});
var slideIndex = 0;
var changeSlide = function(timing) {
setTimeout(function() {
if (timing !== 0) {
slider.slick('slickNext');
}
if (slideIndex >= durationList.length) slideIndex = 0;
changeSlide(durationList[slideIndex++]);
}, timing);
}
changeSlide(0);
});
HTML中的每张幻灯片都有一个数据时间值,这使我可以为每张幻灯片设置一个我需要的时间。
答案 0 :(得分:0)
我想您的问题是错别字,请更正此错误: 无限==>无限
Microsoft.Office.Interop.Word.Application wordApp = new Microsoft.Office.Interop.Word.Application();
wordApp.Visible = false;
wordApp.DisplayAlerts = WdAlertLevel.wdAlertsNone;
object wordTrue = (object)true;
object wordFalse = (object)false;
object fileToOpen = @"D:\Docs\1.docx";
object missing = Type.Missing;
Microsoft.Office.Interop.Word.Document doc1 = wordApp.Documents.Open(ref fileToOpen,
ref missing, ref wordTrue, ref wordFalse, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref wordTrue, ref missing,
ref missing, ref missing, ref missing);
object fileToOpen1 = @"D:\Docs\3.docx";
Microsoft.Office.Interop.Word.Document doc2 = wordApp.Documents.Open(ref fileToOpen1,
ref missing, ref wordTrue, ref wordFalse, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing);
Microsoft.Office.Interop.Word.Document doc = wordApp.CompareDocuments(doc1, doc2, WdCompareDestination.wdCompareDestinationNew, WdGranularity.wdGranularityWordLevel,
true, true, true, true, true, true, true, true, true, true, "", false);