From d28552a485c15126b9793d8095b354068d10126c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Lucas?= Date: Thu, 11 Oct 2012 21:43:37 +0200 Subject: [PATCH] Bind left / right to previous / next page. --- index.php | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 37bfc37..0e396bb 100644 --- a/index.php +++ b/index.php @@ -104,6 +104,26 @@ return false; }); }); + +isPaginated ()) { + $prevLink = $currentPage->getPrevLink (); + $nextLink = $currentPage->getNextLink (); +?> + $(document).keydown(function(e){ +hrefXhtml () . "');}"; + } + if (!is_null ($nextLink)) { + echo "if (e.keyCode == 39) {\$(location).attr('href','" . $nextLink->hrefXhtml () . "');}"; + } + +?> + }); + @@ -220,8 +240,6 @@ isPaginated ()) { - $prevLink = $currentPage->getPrevLink (); - $nextLink = $currentPage->getNextLink (); ?>