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
egoselfaxisAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ray PaseurCommented:
You can probably do this with JavaScript / jQuery by using the setInterval() function.  The function you would call would be the same as whatever is called by the click event handler.  If I get some time later, I'll try to give you a code example that implements this answer.
0
leakim971PluritechnicianCommented:
Add this script :

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

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
egoselfaxisAuthor Commented:
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
0
Ray PaseurCommented:
Yep - it's looking good now!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JavaScript

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.