title: Trying to add Keyboard navigation option to OwlCarousel
body: <p>by default, OwlCarousel slides can't be moved using the keyboard. I used this code to add the feature but returns an error.</p>
  
  <pre><code>var owl = $('#carousel-div-id').data('owlCarousel');
  $(document.documentElement).keyup(function(event) {
  // handle cursor keys
  if (event.keyCode == 37) {
      owl.prev();
  } else if (event.keyCode == 39) {
      owl.next();
  }
  });
  </code></pre>
  
  <p>The error is as follows</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: owl is not defined</p>
  </blockquote>