title: how to possition a button "above" the carousel-control-next
body: <p>I have a carousel and I placed a button which supposed to stop the spinning
  but the button doesn't get click instead the &quot;carousel-control-next&quot;  tag being clicked
  how can I fix this?</p>
  <p>** when I remove the &quot;carousel-control-next&quot; its works fine **</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-js lang-js prettyprint-override"><code>    $("#carouselButton").click(function(){
          if($('#carouselButton').children('span').hasClass('fa fa-pause')){
              $("#mycarousel").carousel('pause');
              $("#carouselButton").children('span').removeClass('fa-pause');
              $("#carouselButton").children('span').addClass('fa-play');
          }
          else{
              $("#mycarousel").carousel('cycle');
              $("#carouselButton").children('span').removeClass('fa-play');
              $("#carouselButton").children('span').addClass('fa-pause');
          }
  
      });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div class="container"&gt;
      &lt;div class="row row-content"&gt;
          &lt;div class="col"&gt;       
              &lt;div id="mycarousel" class="carousel slide" data-ride="carousel"&gt;
                  &lt;div class="carousel-inner" role="listbox"&gt;
                        &lt;div class="carousel-item active" &gt;
                                &lt;p class="d-none d-sm-block"&gt;content1&lt;/p&gt;
                       &lt;/div&gt;
  
                        &lt;div class="carousel-item"&gt;                                  
                                &lt;p class="d-none d-sm-block"&gt;content2 &lt;/p&gt;
                        &lt;/div&gt;
                        
                        &lt;div class="carousel-item"&gt;
                                &lt;p class="d-none d-sm-block"&gt;content3 &lt;/p&gt;
                        &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;!--create in the bottom indicators to show in which slide you are
                      the "slide to allow you to press them and move the the slide you want--&gt;
                  &lt;ol class="carousel-indicators"&gt;
                      &lt;li data-target="#mycarousel" data-slide-to="0" class="active"&gt;&lt;/li&gt;
                      &lt;li data-target="#mycarousel" data-slide-to="1"&gt;&lt;/li&gt;
                      &lt;li data-target="#mycarousel" data-slide-to="2"&gt;&lt;/li&gt;
                  &lt;/ol&gt;
                  &lt;!-----THE BUTTON ------&gt;
                  &lt;button class="btn btn-danger btn-sm" id="carouselButton"&gt;
                      &lt;span class="fa fa-pause"&gt;&lt;/span&gt;
                  &lt;/button&gt;
                  &lt;a class="carousel-control-prev" href="#mycarousel" role="button" data-slide="prev"&gt;
                      &lt;span class="carousel-control-prev-icon"&gt;&lt;/span&gt;
                  &lt;/a&gt;
                  &lt;a class="carousel-control-next" href="#mycarousel" role="button" data-slide="next"&gt;
                      &lt;span class="carousel-control-next-icon"&gt;&lt;/span&gt;
                  &lt;/a&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>