Browse Source

fix for issue #3 - support left and right key navigation

pull/33/head
Sean Hellwig 13 years ago
parent
commit
e0a04380e4
  1. 15
      source/js/VMM.Core.js
  2. 15
      timeline-min.js

15
source/js/VMM.Core.js

@ -354,6 +354,20 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
} }
} }
function onKeypressNav(e) {
switch(e.keyCode) {
//right arrow
case 39:
onNextClick(e);
break;
//left arrow
case 37:
onPrevClick(e);
break;
}
}
function onTouchUpdate(e, b) { function onTouchUpdate(e, b) {
if (slide_positions.length == 0) { if (slide_positions.length == 0) {
@ -590,6 +604,7 @@ if(typeof VMM != 'undefined' && typeof VMM.Slider == 'undefined') {
VMM.bindEvent(".nav-next", onNextClick); VMM.bindEvent(".nav-next", onNextClick);
VMM.bindEvent(".nav-previous", onPrevClick); VMM.bindEvent(".nav-previous", onPrevClick);
VMM.bindEvent(window, onKeypressNav, 'keydown');
} }
/* BUILD /* BUILD

15
timeline-min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save