May as well keep it in the same thread because it's more stuff about my gallery.
I'm fairly happy with how it looks and works but one thing I'd love it to do it be able to go to next and previous photos like you can with Facebook and Lightbox galleries, as well as many others online, by pressing the right and left cursor keys.
I've been searching for hours now trying to figure it out. Looking at onkeypress, onkeyup, onkeydown but can't figure out how to get anything in a workable form.
The next and previous links are generated by PHP so it just needs to be able to replicate those.
var keyDown = function(e) { var evt = e || window.event; switch (evt.keyCode) { case 37: { // left arrow key window.location = URL_FOR_NEXT_PAGE; } case 39: { // right arrow key window.location = URL_FOR_PREV_PAGE; } } return document.defaultAction; // might not be needed // (I use jQuery which makes a lot of this stuff easier) }; // keyDown() // I dunno where you'd put this bit - <body onload="..."> maybe? document.onkeydown = keyDown;