Hello. I'm using jquery hotkeys to bind and run a function when the user taps their right arrow key. When jquery hotkeys detects the right arrow being hit on the keyboard, I want jQuery to click the next pagination link. For some reason this isn't working. I've confirmed pagination works. Also confirmed the selector looks good by getting the below to work with instead of a .trigger, a .remove().
$(document).ready(function() {
jQuery(document).bind('keydown', 'right',function (evt){
$('#header').find('.next_page').trigger('click');
});
});
<div id="view-header">
<a class="next_page" href="/books/?page=2" rel="next">Next →</a>
</div>
Any thoughts on this one? Thanks