We support #BlackLivesMatters !
If you support us then follow us by clicking here and following us!

How to cycle through any anchor link using jQuery?

Get support on JavaScript,jQuery, AJAX and other related technology.
Post Reply
admin
Site Admin
Posts: 44

How to cycle through any anchor link using jQuery?

Post by admin » Thu Aug 22, 2019 10:58 pm

HTML

Code: Select all

<div id="links"> <a class="links" href="http://www.google.com">Google</a>
  <a class="links" href="http://www.facebook.com">Facebook</a>
  <a class="links" href="http://www.Twitter.com">Twitter</a>
</div>
jQuery:

Code: Select all

$(document).ready(function() {
  $('#links').cycle();
})
The default transition time is 4 seconds, but you can override this by setting the timeout option. Like so:

Code: Select all

$(document).ready(function() { 
  $('#Links').cycle({ 
       timeout : 3000 
  }); 
}) 
Demo

Post Reply