Return to 1st image on slideshow

后端 未结 2 357
广开言路
广开言路 2021-01-28 07:26

I asked this question a few days ago and I really need to solve this problem - please help!!

Does anyone know how to add another button to this slideshow that takes the

相关标签:
2条回答
  • 2021-01-28 07:47

    I would look into which div(s) the javascript is animating to move. Then I'd add a button for the control to animate the left position of the starting div back to 0, or however they are structuring it.

    0 讨论(0)
  • 2021-01-28 08:07

    You can see how they defined a function showNextSlide, and then bound it to the div id slideshow-next; you'll want to define a function showFirstSlide that sets currentSlide equal to 1 and calls the update functions, and then bind it to whatever button you decide on. e.g.

    function showFirstSlide()
    {
      currentSlide=1;
      updateContentHolder();
      updateButtons();
    }
    ...
    $("#slideshow-first").click(showFirstSlide);
    
    0 讨论(0)
提交回复
热议问题