Bind left / right to previous / next page.
This commit is contained in:
		
							parent
							
								
									008ac70dc3
								
							
						
					
					
						commit
						d28552a485
					
				
					 1 changed files with 20 additions and 2 deletions
				
			
		
							
								
								
									
										22
									
								
								index.php
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								index.php
									
										
									
									
									
								
							|  | @ -104,6 +104,26 @@ | |||
|                 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> | ||||
| </head> | ||||
| <body> | ||||
|  | @ -220,8 +240,6 @@ | |||
|     </div> | ||||
| <?php | ||||
|     if ($currentPage->isPaginated ()) { | ||||
|         $prevLink = $currentPage->getPrevLink (); | ||||
|         $nextLink = $currentPage->getNextLink (); | ||||
| ?> 
 | ||||
|     <div class="foot"> | ||||
|         <div class="footcenter"> | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue