title: event listener not working in owl carousel
body: <p>i want lo listen to event but it's not working for me 
  as you can see i try to use console.log(pages); to listen to number of pages but when i open console i don't get any response</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>var owl = $('.owl-carousel');
  
  
          owl.owlCarousel({
  
              onDragged: callback,
  
              animateOut: 'fadeOut',
              animateIn: 'fadeIn',
              items: 1,
              loop: true,
              autoplay: false,
              nav: true,
              dots: true
          });
          function callback(event) {
  
              var pages     = event.page.count;     // Number of pages
  
              console.log(pages);
  
          }</code></pre>
  </div>
  </div>
   </p>
  
  <p>Could you please help?</p>