Pause/Play button for dummies.
Hi,
I am using the HTML version of this plugin but I can not get this to work. I have the following code but don't see what I have done wrong.
// JS -----------
jQuery(document).ready(function($) {
$('#full-width-slider').royalSlider({
arrowsNav: true,
loop: true,
keyboardNavEnabled: true,
controlsInside: false,
arrowsNavAutoHide: false,
autoScaleSlider: false,
autoHeight: false,
controlNavigation: 'bullets',
thumbsFitInViewport: false,
navigateByClick: false,
startSlideId: 0,
transitionType:'move',
globalCaption: false,
slidesSpacing: 0,
allowCSS3: true,
autoPlay: {
// autoplay options go gere
enabled: true,
pauseOnHover: false,
stopAtAction: false,
delay: 3000
}
});
$('#toggleAutoPlayBtn').click(function() {
// optionally change button text, style e.t.c.
if(autoStart) {
$(this).html('play');
} else {
$(this).html('pause');
}
autoStart = !autoStart;
$('#full-width-slider').royalSlider('toggleAutoPlay');
});
});
// HTML -----------
Read more...
help.dimsemenov.com
No comments:
Post a Comment