Link to home
Create AccountLog in
Avatar of Refael
RefaelFlag for United States of America

asked on

background slideshow autoplay

Hello Experts,

I am trying to figure out how to make this slideshow auto play. Please if you can help. the entire code including the JS file is provided in codrops.

I really like this slideshow yet i have no idea what to change in order to make autoplay. Thank you.
Avatar of Dejan Vasiljevic
Dejan Vasiljevic

Hi Rafael,

Just add interval like this

var auto = setInterval(1000); // 1000 ms = 1 sec

Open in new window


Thanks,
D.
Avatar of Refael

ASKER

Hi Dejan Vasiljevic

First, thank you. As I am not a JS pro can you tell me where in the script should i add it?
Well when You download source, there should be CSS/HTML/JS folders with file. Open .js file and at the beginning of the script you will find where the creator defined var(s) variables, and you should just add this code after them, where are variables defined. Probably creator defined toggle class so You can add it after toggle, or instead of it.
Avatar of Refael

ASKER

I have the JS file opened yet I do not see any defined var(s) variables at the beginning not toggle?
ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Refael

ASKER

Hi Rob Jurd .... Thank you.

It took me some time to understand what you meant.... a wise quick solution I would say :-))

I am guessing there is no other "elegant" solution yet if this works I am happy.

Thank you again.
Avatar of Refael

ASKER

A quick, yet wise solution :-) Thank you Rob Jurd
No problem... The reasons it's not "elegant" is this isn't a plugin that you has configurable options.  More like code someone has posted.  You could modify the object as there is an internal  _navigate() function but currently that isn't accessible from the outside ;)