title: Bootstrap 5 carousel indicator for multiple carousels
body: <p>I'm trying to trigger multiple carousel sliders via data-bs-target. I tried with class name instead of ID, but it triggers only one.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet"/&gt;
  &lt;script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta1/dist/js/bootstrap.bundle.min.js"&gt;&lt;/script&gt;
  &lt;div class="row"&gt;
  &lt;div class="col-6"&gt;
  &lt;div id="carouselA" class="carousel slide carouselBoth" data-bs-ride="carousel"&gt;
    &lt;ol class="carousel-indicators"&gt;
      &lt;li data-bs-target=".carouselBoth" data-bs-slide-to="0" class="active"&gt;&lt;/li&gt;
      &lt;li data-bs-target=".carouselBoth" data-bs-slide-to="1"&gt;&lt;/li&gt;
      &lt;li data-bs-target=".carouselBoth" data-bs-slide-to="2"&gt;&lt;/li&gt;
    &lt;/ol&gt;
    &lt;div class="carousel-inner"&gt;
      &lt;div class="carousel-item active"&gt;
        &lt;img src="https://via.placeholder.com/300x150/1" class="d-block w-100" alt="..."&gt;
      &lt;/div&gt;
      &lt;div class="carousel-item"&gt;
        &lt;img src="https://via.placeholder.com/300x150/2" class="d-block w-100" alt="..."&gt;
      &lt;/div&gt;
      &lt;div class="carousel-item"&gt;
        &lt;img src="https://via.placeholder.com/300x150/3" class="d-block w-100" alt="..."&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div class="col-6"&gt;
  
  &lt;div id="carouselB" class="carousel slide carouselBoth" data-bs-ride="carousel"&gt;
    &lt;div class="carousel-inner"&gt;
      &lt;div class="carousel-item active"&gt;
        &lt;img src="https://via.placeholder.com/300x150/1" class="d-block w-100" alt="..."&gt;
      &lt;/div&gt;
      &lt;div class="carousel-item"&gt;
        &lt;img src="https://via.placeholder.com/300x150/2" class="d-block w-100" alt="..."&gt;
      &lt;/div&gt;
      &lt;div class="carousel-item"&gt;
        &lt;img src="https://via.placeholder.com/300x150/3" class="d-block w-100" alt="..."&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>I was guessing <code>data-bs-target=&quot;.carouselBoth&quot;</code> would work but looks like I was wrong or I missed something</p>
  <p><a href="https://jsfiddle.net/elyor/6k2p5xes/10/" rel="nofollow noreferrer">JSFIDDLE</a></p>