简体   繁体   English

如何在最后一张幻灯片上停止动画

[英]How to stop animation on last slide

Here is my site . 这是我的网站 Image slider is working fine, but I want the last number to stay on the screen. 图像滑块工作正常,但我希望最后一个数字留在屏幕上。 Now it is in auto play. 现在它处于自动播放状态。 is there anyway to stop the animation on last number? 无论如何要停止最后一个号码的动画?

using this js for slider. 使用 js作为滑块。

Just make this change in line no. 只需在行中进行此更改即可。 803 803

else{
     next = 1;
}

To

else{
     next = '';
 }

Change startAutoplay() function 更改startAutoplay()函数

    function startAutoplay(autoplay){
        autoplayinterval=setInterval(function(){
          if(autoplay == true){
            slider.next();
          }else{
            if(current == children_number){
              clearInterval(autoplayinterval);
            }else{
              slider.next();
            }
          }
        },settings.pauseTime + settings.aniSpeed);
    }

After that, call startAutoplay() 之后,调用startAutoplay()

startAutoplay(settings.autoPlay)

Oh hey. 噢!嗨。 Here's julian (creator of mostslider). 这是朱利安(大多数人的创造者)。 Maybe I should subscript to the tag for my slider... Never thought it's used somewhere as there were no feedback messages or anything else. 也许我应该下标到我的滑块的标签...从来没有想过它被用在某处,因为没有反馈信息或其他任何东西。

I'm really sorry for not answering to your question. 我很抱歉没有回答你的问题。

I see you already got a solution. 我看到你已经有了解决方案。 This brings me to another point for the v2.0.0 release. 这让我想到了v2.0.0版本的另一个观点。 Add a public variable which provides the current slide and the number of slides. 添加一个提供当前幻灯片和幻灯片数量的公共变量。 With this feature this task would be fairly easy. 有了这个功能,这个任务就相当容易了。 If you have more desired features, please report them in the git repo tracker. 如果您有更多所需功能,请在git repo跟踪器中报告。

All the best, Julian 一切顺利,朱利安

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

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