Avatar of egoselfaxis
egoselfaxis
 asked on

Need help updating image carousel so that it auto advances every 5 seconds

I have an image carousel on the homepage of a wordpress site that I manage that I'd like to update so that it auto advances every 5 seconds:

http://moto-authority.com/

(Look underneath the "Quality Pre-Owned Bikes on Sale Now" heading - that's the image carousel I'm referring to)

Currently -- the only way to get it to advance is by clicking on the left & right arrows that are displayed on mouseover. How would I go about adding some custom javascript to this page so that it auto-advances to the "Next" slide every 5 seconds or so?  Please advise.

Thanks,
- Yvan
JavaScriptjQueryHTML

Avatar of undefined
Last Comment
Ray Paseur

8/22/2022 - Mon
SOLUTION
Ray Paseur

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
leakim971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
leakim971

egoselfaxis

ASKER
Leakim971 - thanks for your reply!  Your script worked :

http://moto-authority.com/

The only thing I needed to change/fix was the selector name, .. which was actually "#special-offers":

<script type="text/javascript">
jQuery(function($) {
   setInterval(function() {
          $("#special-offers span:contains(Next)").click();
   }, 5000); // 5 seconds
});
</script>

Open in new window


Ray -- thanks to you as well.  I appreciate how you always volunteer to help. I'm giving you a few points too.

Thanks guys!
- Yvan
Ray Paseur

Yep - it's looking good now!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy