문제

I have an Orbit slider inside a Reveal modal.

I want to reset the slider to go to the first slide when closing the modal.

How can I do this?

도움이 되었습니까?

해결책

    $(document).on('opened', '[data-reveal]', function () {
      // Callback triggered when reveal modal is closed
      $(this).find("[data-orbit-slide=0]").click(); // Click the link to first slide in orbit modal
    });

When slider is closed (and invisible) interactions don't seem to work reliably. Hence we operate once the modal is visible.

다른 팁

Foundation press has changed some verbiage since the previous answer. You can also use:

$(document).find("[data-slide=0]").click();
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top