title: How to delete a specific slide from bootstrap carousel using JQuery
body: <p>I am new to bootstrap.
  Basically in my Carousel, in some slides I have the Decline button, on clicking of which I want to delete/remove that slide and navigate to the next slide.
  Is it possible using JQuery?
  I was trying something similar here in <a href="https://jsfiddle.net/2nqddjpa/1/" rel="nofollow">JSFiddle</a></p>
  
  <pre><code>var $carousel = $('#myCarousel'),
      $carouselItems = $('.item', $carousel);
  
  $carousel.on('slid.bs.carousel', function (e) {
      $carouselItems.removeClass('prev next');
      var $active = $(e.relatedTarget);
      $active.next().addClass('next');
      $active.prev().addClass('prev');
  })
  
  $(document).ready(function(){
      $("button").click(function(){
          $("#div1").remove();
           $("#li1").remove();
          $("#li2").attr("data-slide-to",0);
           $("#li2").attr("data-slide-to",1);
           $("#div2").addClass('active');
      });
  });
  </code></pre>
  
  <p>Thank you very much in advance.</p>