I am using the impress.js and when ever the user presses the space bar, the script moves text around on the screen. Is there a way to have the spacebar be pressed every 5 seconds? Or is there a way to have the impress.js auto move onto the next slide ofter 5 seconds?
Asked
Active
Viewed 1,932 times
1
-
can you add a like to the page where you found this `impress.js`? – Bazzz Mar 12 '12 at 13:23
-
@bazzz Sure.... I got it from https://github.com/bartaz/impress.js/ – nmacbook.nick Mar 13 '12 at 23:21
1 Answers
5
The impress.js
that you use has a next()
function that is called upon pressing (amongst others) the spacebar key.
Possibly you could add a little javascript to call the impress.next()
function every 5 seconds. Have a look at this:
setInterval ('impress.next()', 5000); // 5000 milliseconds is 5 seconds
Here is a little explanation about the setInterval()
function: setInterval()

Bazzz
- 26,427
- 12
- 52
- 69