Skip Navigation

[Gelöst] views slider navigation using keys (keyboard left and right arrows)

This support ticket is created vor 2 Jahre, 10 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 Antworten, has 2 Stimmen.

Last updated by stuart vor 2 Jahre, 10 Monate.

Assisted by: Minesh.

Author
Artikel
#2080005

I have a view that is basically a power point presentation replica, wheat I would like to be able to do is have the view navigable by either the left and right keyboard arrows for the pagination. ad or the mouse scroll wheel if that is what they want.

is this possible?

thanks

#2080031

Minesh
Supporter

Languages: Englisch (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Updated:
I have discuss this again and it seems you are using the classic views not blocks and to add such feature that supports keyboaard left and right arrows you will have to write the custom javascript code.

#2086323

I found a solution, it does not give the same transition effect and feels slower than if i used the native click navigation, but here it is in case anyone else needs it.

jQuery(document).ready(function($){
<!-- Start of Function -->
$(document).keydown(function(e) {
  var prevPageLink = $( ".js-wpv-pagination-previous-link" ).attr('href');
  var nextPageLink = $( ".js-wpv-pagination-next-link" ).attr('href');
  switch(e.which) {
    case 37:
      if ( prevPageLink ) {
        window.location = prevPageLink;
      }
      break;

    case 39:
      if ( nextPageLink ) {
        window.location = nextPageLink;
      }
      break;

    default: return;
  }
  e.preventDefault();
});

<!-- END of Function -->
}); 


#2086325

in-case anyone else needs to save time here is what i managed... its not got the same slide transition for some reason and there feels like a lag that i am going to try and work out...but it does work.

jQuery(document).ready(function($){
<!-- Start of Function -->
$(document).keydown(function(e) {
  var prevPageLink = $( ".js-wpv-pagination-previous-link" ).attr('href');
  var nextPageLink = $( ".js-wpv-pagination-next-link" ).attr('href');
  switch(e.which) {
    case 37:
      if ( prevPageLink ) {
        window.location = prevPageLink;
      }
      break;

    case 39:
      if ( nextPageLink ) {
        window.location = nextPageLink;
      }
      break;

    default: return;
  }
  e.preventDefault();
});

<!-- END of Function -->
}); 


This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.