2

The carousel I had in my rails application was working until a short while ago, now the next and previous buttons don't work. No changes made to this view, or the carousel in the CSS.

Here's my code:

.carousel.slide#myCarousel
 .carousel-inner
  .active.item
    =image_tag("/assets/1.jpg")
    .carousel-caption
      %h4 Caption
  .item
    =image_tag("/assets/2.jpg")
    .carousel-caption
      %h4 Caption
  .item
    =image_tag("/assets/3.jpg")
    .carousel-caption
      %h4 Caption

 %a.carousel-control.left{"data-slide" => "prev", :href => "#myCarousel"} ‹
 %a.carousel-control.right{"data-slide" => "next", :href => "#myCarousel"} ›
sacshu
  • 397
  • 9
  • 20

1 Answers1

0

Found that this solution worked for me:

https://stackoverflow.com/questions/9353294/bootstrap-carousel-not-working

Used this in my header:

<script>
$(function(){
  $('#myCarousel').carousel();
});
</script>
Community
  • 1
  • 1
Gilbert Flamino
  • 101
  • 2
  • 2