Get buttons (prev, next, pause) working for Deck.js

195 Views Asked by At

I am trying to use Deck.js but have a massive issue that is making me feel very very stupid.

I want to have navigation buttons. I want a button that allows the user to move forward and a button that moves back.

Also, if its not too much to ask, a way to make the slideshow move on a timer (A slide moves every 10 seconds) with a pause button.

I have went through the documentation that shows in plain sight the functions to make the buttons work, but I cannot get buttons to show, I have tried everything and I cannot get any buttons at all.

Please help me, how do I enable buttons with deck.js (I have read the documentation many many many times, at this point in time I think i'm too stupid to understand it because I cannot get any buttons to work at all.)

Please help!

Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

Include the deck.navigation JavaScript, usually right after the core JS:

<script src="path/to/deck.navigation.js"></script>

Include the deck.navigation CSS, again after core CSS:

<link rel="stylesheet" href="path/to/deck.navigation.css">

And include this snippet for the left+right buttons themselves inside of the body towards the end:

<a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
<a href="#" class="deck-next-link" title="Next">&#8594;</a>

Other extensions included with deck.js follow the same pattern, including a JS file, a CSS file, and some snippet of HTML. Not all extensions have all of these components.