title: How to bind data attribute instead of id?
body: <p>Use bootstrap 3 carousel - <a href="http://jsfiddle.net/cxv1osq0/" rel="nofollow noreferrer">Fiddle</a></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-css lang-css prettyprint-override"><code>/* for testing only */
  
  .item img {
    width: 100%;
    height: auto
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" /&gt;
  &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
  
  &lt;div data-id="carousel-example-generic" class="carousel slide" data-ride="carousel"&gt;
    &lt;!-- Indicators --&gt;
    &lt;ol class="carousel-indicators"&gt;
      &lt;li data-target="#carousel-example-generic" data-slide-to="0" class="active"&gt;&lt;/li&gt;
      &lt;li data-target="#carousel-example-generic" data-slide-to="1"&gt;&lt;/li&gt;
      &lt;li data-target="#carousel-example-generic" data-slide-to="2"&gt;&lt;/li&gt;
    &lt;/ol&gt;
  
    &lt;!-- Wrapper for slides --&gt;
    &lt;div class="carousel-inner" role="listbox"&gt;
      &lt;div class="item active"&gt;
        &lt;img src="http://placehold.it/450x350" alt="Slide 1"&gt;
        &lt;div class="carousel-caption"&gt;
          Caption Slide 1
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="item"&gt;
        &lt;img src="http://placehold.it/450x350" alt="Slide 2"&gt;
        &lt;div class="carousel-caption"&gt;
          Caption Slide 2
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="item"&gt;
        &lt;img src="http://placehold.it/450x350" alt="Slide 3"&gt;
        &lt;div class="carousel-caption"&gt;
          Caption Slide 3
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;!-- Controls --&gt;
    &lt;a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"&gt;
      &lt;span class="glyphicon glyphicon-chevron-left" aria-hidden="true"&gt;&lt;/span&gt;
      &lt;span class="sr-only"&gt;Previous&lt;/span&gt;
    &lt;/a&gt;
    &lt;a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"&gt;
      &lt;span class="glyphicon glyphicon-chevron-right" aria-hidden="true"&gt;&lt;/span&gt;
      &lt;span class="sr-only"&gt;Next&lt;/span&gt;
    &lt;/a&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>In <a href="http://getbootstrap.com/docs/3.3/javascript/#carousel" rel="nofollow noreferrer">bootstrap documentation</a> uses the <code>id</code> for the <code>carousel</code></p>
  
  <pre><code>&lt;!-- Carousel --&gt;
  &lt;div id="carousel-example-generic" class="carousel slide" data-ride="carousel"&gt;
  
  &lt;!-- Carousel Indicators --&gt;
  &lt;li data-target="#carousel-example-generic" data-slide-to="1"&gt;&lt;/li&gt;
  
  &lt;!-- Carousel Controls --&gt;
  &lt;a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"&gt;
  </code></pre>
  
  <p>I would like to use instead of <code>id</code> the <code>data attribute(data-id)</code>   </p>
  
  <pre><code>&lt;!-- Carousel --&gt;
  &lt;div data-id="carousel-example-generic" class="carousel slide" data-ride="carousel"&gt;
  </code></pre>
  
  <p>If you use the data attribute - then pagination and navigation does not work</p>
  
  <p>How to bind the data attribute to the pagination and navigation of the slider?</p>
  
  <p>Thank you</p>
  
  <p>I will be glad to any help</p>