diff --git a/jquery.scrollify.js b/jquery.scrollify.js index e3377ac..3751cd0 100644 --- a/jquery.scrollify.js +++ b/jquery.scrollify.js @@ -358,6 +358,24 @@ if touchScroll is false - update index animateScroll(index,false,true,false); } } + } else if (e.keyCode == 36) { + if (index > 0) { + if (atTop()) { + e.preventDefault(); + index = 0; + //index, instant, callbacks, toTop + animateScroll(index, true, true, false); + } + } + } else if (e.keyCode == 35) { + if (index < heights.length - 1) { + if (atBottom()) { + e.preventDefault(); + index = heights.length - 1; + //index, instant, callbacks, toTop + animateScroll(index, true, true, false); + } + } } }, init:function() {