R
R
Rokis2015-10-25 20:46:21
PHP
Rokis, 2015-10-25 20:46:21

How to implement page turning when pressing the arrows on the keyboard in Wordpress?

There is a code:

<div class='next1'>
<?php previous_post_link('%link', '<img src="#" width="45" height="35" alt="previous"  />'); ?>
</div>
<div class='prev1'>
<?php next_post_link('%link', '<img src="#" width="45" height="35" alt="Next" />') ; ?>
</div>

How to implement page turning when pressing the arrows on the keyboard?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Vorotnev, 2015-10-25
@HeadOnFire

Javascript Keyboard Events (usually keyup). A little more here . In Google information wagons.

R
Rokis, 2015-10-25
@Rokis

Found this code:

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type="text/javascript"> 
$(document).keydown(function(e){
    if (e.keyCode == 37) { 
       ??????????
       return false;
    }
});
 </script>

What to insert instead of questions I can not understand?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question