Autoplay not working (SlidesJS)
Pergunta
I am using slides.js for one of my projects; however, the autoplay feature is not working properly.
Here is what I am doing:
$('#slides').slides({
width: 600,
height: 120,
generateNextPrev: false,
pagination: false,
play: 1000
});
The documentation http://slidesjs.com/ says that by giving a positive number to play
, autoplay should work. Can someone help?
Solução 4
I don't know why it works this is something which is not given in the documentation :-
$(function(){
$('.slides').slides({
width: 600,
height: 120,
pagination: false,
previous: false
});
$('.slides').slides("play");
});
Outras dicas
I know this has been answered, but the function is actually .slidesjs NOT .slides
For SlidesJS-3 you can use the following to trigger autoplay :
$(".slides").slidesjs({
width: 768,
height: 158,
play: {
auto: true
}
});
check the scripts loaded are not if yes then that should be in sequence like
- script src="http://code.jquery.com/jquery-latest.min.js"
- script src="slides.js"
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow