Bootstrap Carousel

Out of context: Reply #2

  • Started
  • Last post
  • 7 Responses
  • Maaku0

    Of course, this would be the html code for the navigation:

    <ul id="carousel-nav">
    <li><a href="#my-carousel" data-to="1" >Slide 1</a></li>
    <li><a href="#my-carousel" data-to="2" >Slide 2</a></li>
    <li><a href="#my-carousel" data-to="3" >Slide 3</a></li>
    </ul>

    and this is the JS for the carousel:

    $('#carousel-nav a').click(function(q){
    q.preventDefault();
    targetSlide = $(this).attr('data-to')-1;
    $('#my-carousel').carousel(targe...
    });

    The thing is that right now the code works if the thumbnails and carousel are on the same page but I have no idea how to make it work if the thumbnails are on page 1 and the carousel on page 2.

View thread