title: How to play bootstrap 4 carousel on mouse hover WITH disabled autoplay on page load?
body: <p>I have created a carousel with bootstrap 4. I got the cycle through on hover to work. However, The carousel autoplays when the page loads. Is there anyway to disable the autoplay on page load and have it be the first slide, only playing when the mouse hovers over it?</p>
  
  <p>Also, when the mouse leaves, it pauses. When you hover over it again, it will play.</p>
  
  <p>I have provided my HTML and JS below.</p>
  
  <p>Thanks!</p>
  
  <p>I've tried adding pause: true to the JS. that just pauses the entire carousel. I've also tried entering in the data-interval: 200 to the HTML and removing it from the JS. However, this only allows a singular cycle and pause to work, and doesn't work once I move the mouse onto the carousel and leave it. </p>
  
  <pre><code>     &lt;div id="carouselWork" class="carousel"&gt;
        &lt;div class="carousel-inner"&gt;
          &lt;div class="carousel-item active"&gt;
              &lt;img src="Work/Posters/1.jpg" style="width:100%;"&gt;
          &lt;/div&gt;
          &lt;div class="carousel-item"&gt;
              &lt;img src="Work/Posters/2.jpg" style="width:100%;"&gt;
          &lt;/div&gt;
          &lt;div class="carousel-item"&gt;
              &lt;img src="Work/Posters/3.jpg" style="width:100%;"&gt;
          &lt;/div&gt;
          &lt;div class="carousel-item"&gt;
              &lt;img src="Work/Posters/4.jpg" style="width:100%;"&gt;
          &lt;/div&gt;
          &lt;div class="carousel-item"&gt;
              &lt;img src="Work/Posters/5.jpg" style="width:100%;"&gt;
          &lt;/div&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  
  
  
  $(document).ready(function() {
  
  $('.carousel').carousel({
    interval: 200
  })
  
  $('#carouselWork').hover(function(){
     $(".carousel").carousel('cycle');
  },function(){
     $(".carousel").carousel('pause');
  });
  });
  </code></pre>
  
  <p>Expected: When the page loads, I want the carousel to be paused. When I hover over the carousel, it will cycle through at the specified interval of 200. When I move my mouse outside of the carousel, it will pause.</p>
  
  <p>Actual: The functionality of playing/pausing on hover works, but the carousel autoplays at the interval of 200 when the page loads. </p>