Two sliders with one navigation



  • Two sliders who work in sync. I found a decision: http://www.bootply.com/Jxk1uu3WlN The first two sliders work together! However, I want to make sure they switch in sync on the markers. I added the markers, but I don't know what else to do. I tried to do the same thing to the usual switches, but it didn't work out. Who knows how to get out of this situation?



  • Got it. Below down, who needs to be.

    For the markers, he added "nav."

    And then the JS changed the code from that:

    $('.carousel-sync').carousel('cycle');
    $('.carousel-sync').on('click', '.carousel-control[data-slide]', function (ev) {
        ev.preventDefault();
        $('.carousel-sync').carousel($(this).data('slide'));
    });
    

    For this:

    $('.carousel-sync').carousel('cycle');
    $('.carousel-sync').on('click', '.nav[data-slide-to]', function (ev) {
        ev.preventDefault();
        $('.carousel-sync').carousel($(this).data('slide-to'));
    });
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2