Streaming live at 10am (PST)

Is there a way to control a slider with the keyboard arrow keys and not just clicking on the buttons on screen?


#1

Is there a way to control a slider with the keyboard arrow keys and not just clicking on the buttons on screen?


#2

I've also wandered about this... Likewise arrow key navigation to sections?


#3

Also like to know ... someone ??


#4

Hey lets reignite this conversation!

The initial question received 250+ views it seems as if its on peoples mind!

And not only that, I feel as if using the arrow keys to go through sliders for say photographer sites or any slide of that matter should be an innate function when navigating sliders.

I wonder why this hasn't been answered and/or why it isn't just built within the sliders already.


#5

Inserting this into the Code Section on the page with the Slider works for me so far..
Jim

<script>
var Webflow = Webflow || [];
Webflow.push(function () {

$(document).keydown(function(e) {
    switch(e.which) {
        case 37: // left
          $('.w-slider-arrow-left').trigger('tap');
          break;
        case 38: // up
          break;
        case 39: // right
          $('.w-slider-arrow-right').trigger('tap');
          break;
        case 40: // down
          break;
        default: return; // exit this handler for other keys
    }
    e.preventDefault(); // prevent the default action (scroll / move caret)
});
});

</script>

Controlling slider with arrows + more
#6