title: Fire event when owl carousel(2.3) reaches to the last slide
body: <p>I am using owl carousel, in bootstrap modal pop up,for last slide need to close the popup,</p>
  
  <p>I was trying with the following code, but no luck, is there any way ,where I can fire event on last owl slider , to close modal popup</p>
  
  <pre><code> $(document).ready(function(){
         $(".owl-carousel").owlCarousel({
           loop:true,
           dots:true,
           nav:true,
           items:1,
           autoplay: false,
           autoplayTimeout: 7000,
               autoplaySpeed: 1400,
           autoplayHoverPause: true,
           navigation: false,
           slideSpeed: 300,
           paginationSpeed: 400,
           singleItem: true,
           autoHeight: true,
           afterMove: moved,
         })
  
         function moved() {
          $(".owl-carousel").on('change.owl.carousel', function(e) { 
  
            var total = e.item.count, // # of total items
            itemsPerPage = e.page.size, // # of items that appear per page
            itemGoOut = e.item.index, // index of last item that appeared then went out (index start with 0)
            itemRemain = total - (itemsPerPage + itemGoOut + 1);
  
            if(itemRemain === 0){
                console.log("No more Items");
            }
  
            });
          }
        });
  
  </code></pre>