{"id":621,"date":"2013-06-29T19:28:42","date_gmt":"2013-06-29T19:28:42","guid":{"rendered":"https:\/\/bloggeruser.com\/?p=621"},"modified":"2015-10-14T21:06:07","modified_gmt":"2015-10-14T21:06:07","slug":"make-your-blog-easy-to-navigate-with-keyboard-arrows","status":"publish","type":"post","link":"https:\/\/bloggeruser.com\/make-your-blog-easy-to-navigate-with-keyboard-arrows\/","title":{"rendered":"Make your Blog Easy to Navigate with Keyboard Arrows"},"content":{"rendered":"
You might like having Next and Previous buttons at the bottom of each post in your blogger blog. Using Keyboard Arrows to do those functions of Next<\/strong> and Previous<\/strong> Posts within your blog would definitely be more useful to your blog.<\/p>\n Follow this blogger tutorial to learn how to implement this cool navigation feature in your blogger blog.<\/p>\n <\/p>\n You will need to simply add a widget in your blog to achieve this keyboard navigation feature. Follow the instructions below for adding the widget.<\/p>\n 1. Go to \u201cLayout<\/strong>\u201d tab on the blog you want to implement this feature. Leave the title empty so that nothing appears on your front-end. The widget can simply be deleted in case you change your mind and want to remove the feature.<\/p>\nAdding the Widget<\/h2>\n
\n2. \u201cAdd a Gadget<\/strong>\u201d in your sidebar or footer area.
\n3. Select the HTML\/JavaScript gadget<\/strong> and paste the below code in the gadget.<\/p>\nCode for the Widget<\/h2>\n
<script type='text\/javascript'>\r\ndocument.onkeyup = function(event)\r\n{\r\nif (document.activeElement.nodeName == 'TEXTAREA' || document.activeElement.nodeName == 'INPUT') return;\r\nevent = event || window.event;\r\nswitch(event.keyCode)\r\n{\r\ncase 37:\r\nvar newerLink = document.getElementById('Blog1_blog-pager-newer-link');\r\nif(newerLink !=null) window.location.href = newerLink.href;\r\nbreak;\r\ncase 39:\r\nvar olderLink = document.getElementById('Blog1_blog-pager-older-link');\r\nif(olderLink!=null) window.location.href = olderLink.href;\r\n}\r\n};\r\n<\/script> <\/pre>\n