auntnini
03-15-2012, 12:05 AM
1) Script Title: Continuous Reel Slideshow
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/reelslideshow.htm
3) Describe problem:
At http://pauladamdavis.com/blog/2011/05/add-keyboard-navigation-to-slide-shows/
found this
$(document).keydown(function(e){ if (e.keyCode == 37 || e.keyCode == 38) { // Left or up keys $("#prevLink").click(); } if (e.keyCode == 39 || e.keyCode == 40) { // Right or down keys $("#nextLink").click(); } });
And was trying to add it to DD's Continuous Reel slideshow http://www.dynamicdrive.com/dynamicindex14/reelslideshow.htm. Could keyboard navigation be added here? Or where?
navigate:function(keyword){ //keyword: "back" or "forth"
clearTimeout(this.rotatetimer)
var dir=(keyword=="back")? (this.setting.orientation=="h"? "right" : "down") : (this.setting.orientation=="h"? "left" : "up")
var targetslide=(keyword=="back")? this.curslide-1 : this.curslide+1
targetslide=(targetslide<0)? this.$imageslides.length-1 : (targetslide>this.$imageslides.length-1)? 0 : targetslide //wrap around
if (this.animation_isrunning==false)
this.slide(targetslide, dir)
},
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/reelslideshow.htm
3) Describe problem:
At http://pauladamdavis.com/blog/2011/05/add-keyboard-navigation-to-slide-shows/
found this
$(document).keydown(function(e){ if (e.keyCode == 37 || e.keyCode == 38) { // Left or up keys $("#prevLink").click(); } if (e.keyCode == 39 || e.keyCode == 40) { // Right or down keys $("#nextLink").click(); } });
And was trying to add it to DD's Continuous Reel slideshow http://www.dynamicdrive.com/dynamicindex14/reelslideshow.htm. Could keyboard navigation be added here? Or where?
navigate:function(keyword){ //keyword: "back" or "forth"
clearTimeout(this.rotatetimer)
var dir=(keyword=="back")? (this.setting.orientation=="h"? "right" : "down") : (this.setting.orientation=="h"? "left" : "up")
var targetslide=(keyword=="back")? this.curslide-1 : this.curslide+1
targetslide=(targetslide<0)? this.$imageslides.length-1 : (targetslide>this.$imageslides.length-1)? 0 : targetslide //wrap around
if (this.animation_isrunning==false)
this.slide(targetslide, dir)
},