0

I have used the following jquery to have horizontal scrolling of the content with MOUSE SCROLLER :

http://www.htmldrive.net/items/show/966/jQuery-Horizontal-automatic-Scrollbars-with-mouse

Now I want to carry out this horizontal scrolling with the right and left keys of the keyboard but I can't figure out as to how to do this!

halfer
  • 19,824
  • 17
  • 99
  • 186
Azim Saiyed
  • 392
  • 1
  • 5
  • 15

1 Answers1

0

Maybe you can "fake" the click on the two buttons like this :

<script>
    $('body').keydown(function(e) {
        if(e.keyCode == 37) { // left key down
            $('#left_scroll').click();
        } else if(e.keyCode == 39) { // right key down
            $('#right_scroll').click();
        }
    });
</script>
Franck
  • 160
  • 4
  • 10
  • thanks for replying but i there nothing like #left_scroll or #right_scroll ! i want to invoke the scroll when you press the key down ! – Azim Saiyed Dec 13 '13 at 15:05