The plugin API offers very useful methods for advanced JavaScript and jQuery developers. We're planning to improve our API to make it more useful for all of our customers.
Advanced Usage
List of the Methods Provided by the API
The current API includes methods for selecting individual slides and controlling autoplay. A full list of the available methods can be seen below. The code base is well structured and easy to use and expand. You can add your own API methods for your own purposes.
- getSelectedIndex()
- selectNext()
- selectPrevious()
- select(index)
- startAutoplay()
- stopAutoplay()
Using the Plugin API to Enhance User Experience
A reference to your gallery can be acquired and used to enhance the functionality of the gallery. A sample enhancement can be seen below. The previous and next buttons has been added to the gallery by adding a few lines of javascript code.
<script type="text/javascript"> $(function() { var vion = $("#your-gallery-id").vion(); $("#next").bind("click", function() { vion.selectNext(); }); $("#prev").bind("click", function() { vion.selectPrevious(); }); }); </script>