J
J
junior22019-02-22 16:25:50
css
junior2, 2019-02-22 16:25:50

How to display fancybox modal window?

5c6ff55927dc8604896829.png
There is a slider, when you click "I don't want" the picture changes, how to make it so that when you click the "I want" button, a certain fancybox window appears, where the current picture with text will be.
slider code

var slideIndex = 1;
       showDivs(slideIndex);
         function plusDivs(n) {
        showDivs(slideIndex += n);
      }


      function showDivs(n) {
        var i;
        var x = document.getElementsByClassName("mySlides");
        if (n > x.length) {
        	slideIndex = 1
        } 
          if (n < 1) {
          	slideIndex = x.length
          } ;
        for (i = 0; i < x.length; i++) {
          x[i].style.display = "none"; 
        }

        x[slideIndex-1].style.display = "block"; 
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
yarnstart, 2019-02-22
@junior2

Next time, if you want a quick response - apply a sandbox with your results
https://codepen.io/anon/pen/aXgQdO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question