Last active
December 31, 2015 18:22
-
-
Save phillcoxon/8026056 to your computer and use it in GitHub Desktop.
Slidesjs.com - stopping the slider.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- SlidesJS Required: Initialize SlidesJS with a jQuery doc ready --> | |
| <script> | |
| jQuery(function() { | |
| jQuery('#slides').slidesjs({ | |
| width: 960, | |
| height: 370, | |
| navigation: { | |
| active: false, | |
| effect: "fade" | |
| }, | |
| pagination: { | |
| active: false, | |
| effect: "fade" | |
| }, | |
| effect: { | |
| fade: { | |
| speed: 1000 | |
| } | |
| }, | |
| play: { | |
| auto: true, | |
| interval: 3000, | |
| effect: "fade" | |
| }, | |
| callback: { | |
| complete: function(current) { | |
| console.log('current = ' + current); | |
| var total = jQuery("#slides img").length - 2; | |
| if (current >= total) { | |
| clearInterval(jQuery('#slides').data('interval')); | |
| // How do I clear the interval value inside of play:{ interval: 3000 } ? | |
| } | |
| } | |
| }, | |
| }); | |
| }); | |
| </script> | |
| <!-- End SlidesJS Required --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment