PDA

View Full Version : Need help activating slideshow navigation with arrow keys



MamaGeek
11-05-2012, 02:05 AM
1) Script Title:
Ultimate Fade-in slideshow (v2.4)

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem:
I would like to active the 'prev' and 'next' links when a visitor to my site types the left or right arrow key. Any idea how to do this? Thanks!

ajfmrf
11-05-2012, 03:19 AM
please post the url of your page.Otherwise nobody knows know what to do to help you.

jscheuer1
11-05-2012, 06:49 AM
Add the highlighted as shown after the on page init:


. . . 30.tinypic.com/531q3n.jpg"],
["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
],
displaymode: {type:'manual', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 500, //transition duration (milliseconds)
descreveal: "always",
togglerid: "fadeshow2toggler"
})

jQuery(document).keydown(function(e){
e.keyCode === 37 && jQuery('.prev').trigger('click');
e.keyCode === 39 && jQuery('.next').trigger('click');
});

</script>

MamaGeek
11-25-2012, 04:47 PM
Fantastic! Thank you!