var bootCarousel = $(".carousel"); bootCarousel.append(""); var indicators = $(".carousel-indicators"); bootCarousel.find(".carousel-inner").children(".item").each(function(index) { (index === 0) ? indicators.append("
  • ") : indicators.append("
  • "); }); $('.carousel').carousel();