title: Bootstrap Carousel to have different URL for each slide
body: <p>My bootstrap carousel is located here: <code>testdomain.org/about.html</code> and when the slide changes, the URL in the address bar remains the same. I want the URL to auto change when the slides change to something like this:</p>
  
  <pre><code>https://testdomain.org/about.html#slide1
  https://testdomain.org/about.html#slide2
  https://testdomain.org/about.html#slide3
  </code></pre>
  
  <p>How can we make this happen?I created this <a href="https://jsfiddle.net/99ndj8hq/" rel="nofollow noreferrer">JSFiddle Demo</a> for your convenience. I don't know how to go about writing JS for this :(</p>
  
  <p>It's the standard bootstrap HTML:</p>
  
  <pre><code>&lt;div id="myCarousel" class="carousel slide" data-ride="carousel"&gt;
    &lt;!-- Wrapper for slides --&gt;
    &lt;div class="carousel-inner" role="listbox"&gt;
      &lt;div class="item active"&gt;
        &lt;img src="img_chania.jpg" alt="Chania"&gt;
        &lt;div class=""&gt;
          &lt;h3&gt;Chania&lt;/h3&gt;
          &lt;p&gt;The atmosphere in Chania has a touch of Florence and Venice.&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="item"&gt;
        &lt;img src="img_chania2.jpg" alt="Chania"&gt;
        &lt;div class=""&gt;
          &lt;h3&gt;Chania&lt;/h3&gt;
          &lt;p&gt;The atmosphere in Chania has a touch of Florence and Venice.&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="item"&gt;
        &lt;img src="img_flower.jpg" alt="Flower"&gt;
        &lt;div class=""&gt;
          &lt;h3&gt;Flowers&lt;/h3&gt;
          &lt;p&gt;Beatiful flowers in Kolymbari, Crete.&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class="item"&gt;
        &lt;img src="img_flower2.jpg" alt="Flower"&gt;
        &lt;div class=""&gt;
          &lt;h3&gt;Flowers&lt;/h3&gt;
          &lt;p&gt;Beatiful flowers in Kolymbari, Crete.&lt;/p&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;!-- Left and right controls --&gt;
    &lt;a class="left carousel-control" href="#myCarousel" 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="#myCarousel" 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>
  
  <p>DEMO Screenshot of the URL in the Address bar should look like this
  <a href="https://i.stack.imgur.com/ukUCY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ukUCY.png" alt="enter image description here"></a></p>