javascript - How can I add go to the next slide in impress.js -



javascript - How can I add go to the next slide in impress.js -

impress.js new web presentation written using javascript. want create custom events go next page. example, might create "next" , "previous" button.

the entire impress.js file function, calling selectprev(); within function go next page. however, i'm not javascript, don't know how phone call selectprev(); outside function.

the file can found here: https://github.com/bartaz/impress.js/blob/master/js/impress.js

by looks of it, whole file within closure, , selectnext local closure. additionally, used indirectly in key listener, getting there impractical.

thus, without modifying source, not see easy way @ selectprev/selectnext.

here message commit 6 hours ago:

impressive refactoring of slide selection - getting closer api

it seems developer planning add together proper api soon. if wait little, there should standard, sanctioned , (hopefully) documented way interact impress.js programatically.

if want quick hack, have button trigger key event. if you're using jquery, can this:

$(document).trigger($.event("keydown", { keycode: 38 }))

38 go next slide , 40 previous.

javascript

Comments

Popular posts from this blog

delphi - blogger via idHTTP : error 400 bad request -

c++ - compiler errors when initializing EXPECT_CALL with function which has program_options::variables_map as parameter -

How do I check if an insert was successful with MySQLdb in Python? -