Stop failing if there is no previous/next to go to
This commit is contained in:
parent
5cacba2395
commit
1213b8260a
@ -19,10 +19,14 @@
|
|||||||
$(document).keydown(function(event){
|
$(document).keydown(function(event){
|
||||||
switch(event.which){
|
switch(event.which){
|
||||||
case 37:
|
case 37:
|
||||||
window.location = $('.navigation_left').attr('href');
|
if($('a.navigation_left').length) {
|
||||||
|
window.location = $('a.navigation_left').attr('href');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 39:
|
case 39:
|
||||||
window.location = $('.navigation_right').attr('href');
|
if($('a.navigation_right').length) {
|
||||||
|
window.location = $('a.navigation_right').attr('href');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user