Link to home
Create AccountLog in
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
SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of egoselfaxis
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
Yep - it's looking good now!