Bootstrap Carousel in Rails suddenly stopped working
The carousel I had in the rails app worked a while ago, now the next and previous buttons don't work. No changes to this view or carousel in 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"} ›
+2
source to share
1 answer
Found this solution to work for me:
fooobar.com/questions/1103483 / ...
Used in my header:
<script>
$(function(){
$('#myCarousel').carousel();
});
</script>
0
source to share