title: How to enable keyboard navigation for bxslider?
body: <p>I'm using bxslider and added two buttons called #slider-next and #slider-prev. The mouse click events work very well - when clicking the next slide appears and all my other code is executed. But I want to navigate with the keyboard arrows through the slideshow. Is that possible? If yes, how? I tried with:</p>
  
  <pre><code>/* enable keyboard navigation */ 
          $(document).keyup(function (e) {
                  if (e.keyCode == 37) { //left arrow
                      $( "#slider-prev" ).click(); 
                  }
                  if (e.keyCode == 39) { //right arrow
                      $( "#slider-next" ).click(); 
                  }
           }); 
  </code></pre>
  
  <p>All of my other code of my slider-prev and slider-next click function was executed BUT the next or previous picture of the slide didnt appear. Did I miss something?</p>
  
  <p>Edit:
  I looked through the bxslider documentary again and found:</p>
  
  <blockquote>
    <p>goToNextSlide Performs a "Next" slide transition</p>
    
    <p>example: slider = $('.bxslider').bxSlider(); slider.goToNextSlide();</p>
    
    <p>goToPrevSlide Performs a "Prev" slide transition</p>
    
    <p>example: slider = $('.bxslider').bxSlider(); slider.goToPrevSlide();</p>
  </blockquote>
  
  <p>But after modifying my keyup function the browser crushed :(</p>