johnpolacek / scrolldeck.js

jQuery plugin for making scrolling presentation decks
http://johnpolacek.github.com/scrolldeck.js/
672 stars 133 forks source link

Remove space scroll #16

Open br0k3n opened 11 years ago

br0k3n commented 11 years ago

Hi,

I love ScrollDeck, but I've a little question.

How can I avoid the scroll down when I hit the space key?

Thanks a lot :)

gunaifitm85 commented 11 years ago

yes.. i have the same question... any answer ? love the scrolldeck plugin..thx john polacek

gunaifitm85 commented 11 years ago

i found fix for my case, actually i have a textarea inside the slide, the problem is when i hit space while focusing in the textarea the page scrolling to the next slide, now i edit the js file in line127

else if ((e.keyCode == 39 || e.keyCode == 32 || e.keyCode == 40) && currIndex != slides.length-1) {
                    scrollToSlide(getNextScrollpoint());
                }

and remove the || e.keyCode == 32 line. it did works for me when i'm focus or writing in the textarea.

johnpolacek commented 11 years ago

Yes, that's what you can do. Thanks!

Dimosthenis commented 11 years ago

Hello, I haven't tried it yet but I need one more tip similar to this one.

First I need to disable scrolling unless an event occurs (like a click) on a button. (Scrollbars are gone with the html {overflow:hidden}), the spacebar and arrow keys solution is written from gunaifitm85 above me (?).

Cause of that I need to have specific sized div tags so that every .slide div takes up 100% of the screen without the user being able to jump to the next one unless that event (as mentioned above).

Could you please point me at some direction? Thank you