Fancybox also has API methods for interacting with image slideshows. We can use these methods to start or stop playback, move to the next or previous image, and move to any image in the slideshow. Let's create some simple links to move around the slideshow using the API.
We'll start with code similar to that found in the Creating an image gallery recipe. The only difference will be that we will include the
styles.css file so we can add some custom styles.
<div class="custom-controls"> <a href="#" class="previous">Previous</a> <a href="#" class="play-pause">Play</a> ...