jQuery Plugin For Custom Keyboard Page Navigation

File Size: 6.21 KB
Views Total: 1334
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
jQuery Plugin For Custom Keyboard Page Navigation

A small accessible jQuery plugin which allows the visitors to navigate between next/prev containers with custom hot keys.

How to use it:

1. Include the jQuery library and the jQuery keyboard navigation plugin in the page.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="jquery.hotkeys.js"></script>

2. Include the jQuery hotkeys plugin for custom keyboard events.

<script src="jquery.keyboard-navigation.js"></script>

3. Wrap your content into multiple containers with the same class.

<div class="posts">
  <div class="post">Section 1</div>
  <div class="post">Section 2</div>
  <div class="post">Section 3</div>

4. Initialize the plugin and bind the custom keyboard events.


// init jquey navigation

// w - next
$(document).bind('keydown', 'w', function(){

// s - prev
$(document).bind('keydown', 's', function(){

$('.post').on('selected', function(){
console.log('selected element', this);


Change log:


  • fix img tag bug


  • add selected class

This awesome jQuery plugin is developed by kulakowka. For more Advanced Usages, please check the demo page or visit the official website.