mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-07-08 00:20:35 +00:00
theme: rework header UX #151
This commit is contained in:
parent
ff06a8ad41
commit
6f35177349
6 changed files with 73 additions and 112 deletions
static/js
|
@ -375,10 +375,10 @@ jQuery(function() {
|
|||
|
||||
// allow keyboard control for prev/next links
|
||||
jQuery(function() {
|
||||
jQuery('.nav-prev').click(function(){
|
||||
jQuery('a.nav-prev').click(function(){
|
||||
location.href = jQuery(this).attr('href');
|
||||
});
|
||||
jQuery('.nav-next').click(function() {
|
||||
jQuery('a.nav-next').click(function() {
|
||||
location.href = jQuery(this).attr('href');
|
||||
});
|
||||
});
|
||||
|
@ -393,12 +393,12 @@ jQuery(function() {
|
|||
jQuery(document).keydown(function(e) {
|
||||
// prev links - left arrow key
|
||||
if(e.which == '37') {
|
||||
jQuery('.nav.nav-prev').click();
|
||||
jQuery('a.nav-prev').click();
|
||||
}
|
||||
|
||||
// next links - right arrow key
|
||||
if(e.which == '39') {
|
||||
jQuery('.nav.nav-next').click();
|
||||
jQuery('a.nav-next').click();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue