Bind left / right to previous / next page.
This commit is contained in:
parent
008ac70dc3
commit
d28552a485
22
index.php
22
index.php
|
@ -104,6 +104,26 @@
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if ($currentPage->isPaginated ()) {
|
||||||
|
$prevLink = $currentPage->getPrevLink ();
|
||||||
|
$nextLink = $currentPage->getNextLink ();
|
||||||
|
?>
|
||||||
|
$(document).keydown(function(e){
|
||||||
|
<?php
|
||||||
|
if (!is_null ($prevLink)) {
|
||||||
|
echo "if (e.keyCode == 37) {\$(location).attr('href','" . $prevLink->hrefXhtml () . "');}";
|
||||||
|
}
|
||||||
|
if (!is_null ($nextLink)) {
|
||||||
|
echo "if (e.keyCode == 39) {\$(location).attr('href','" . $nextLink->hrefXhtml () . "');}";
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
});
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -220,8 +240,6 @@
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
if ($currentPage->isPaginated ()) {
|
if ($currentPage->isPaginated ()) {
|
||||||
$prevLink = $currentPage->getPrevLink ();
|
|
||||||
$nextLink = $currentPage->getNextLink ();
|
|
||||||
?>
|
?>
|
||||||
<div class="foot">
|
<div class="foot">
|
||||||
<div class="footcenter">
|
<div class="footcenter">
|
||||||
|
|
Loading…
Reference in a new issue