Keyboard navigation

Permalink Browser Info Environment
Would it be possible to enable keyboard navigation (arrow keys) to go to the next/previous slide?

Type: Discussion
Status: Resolved
okapi
View Replies:
shahroq replied on at Permalink Reply
shahroq
Hi,
Try adding this code to your block template:
jQuery(document.documentElement).keyup(function (event) {    
    var owl = jQuery(".owl-carousel");
    if (event.keyCode == 37) {
       owl.trigger('owl.prev');
    } else if (event.keyCode == 39) {
       owl.trigger('owl.next');
    }
});
okapi replied on at Permalink Reply
okapi
Hi, that works perfectly! Thank you so much for taking the time to help me!
Cheers,
Michael

concrete5 Environment Information

Concrete5 8.4.3

Browser User-Agent String

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:63.0) Gecko/20100101 Firefox/63.0

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You may not request a refund that is not currently owned by you.