View Full Version : Rotating text links on my site
Jon12345
11-23-2018, 10:16 AM
I want to rotate some text links on my side. My code is:
<a href="https://mysite.com" target="_blank" rel="nofollow">Anchor text</a>
Is there some simple code I can put in my template for this?
PinkMilk
11-23-2018, 11:21 PM
<a href="https://www.css3maker.com/text-rotation.html" target="_blank">https://www.css3maker.com/text-rotation.html</a>
Jon12345
11-26-2018, 10:03 AM
I don't mean physical rotation but rather rotating between a list of several different links.
e.g. link to Google. When page is refreshed, it then shows Facebook link. etc.
Or, it can just be randomly chosen rather than rotated. Here is some code I found:
var txtGreeting = 10;
var randomCount = Math.round(Math.random() * (txtGreeting - 1)) + 1;
var greeting = new Array();
greeting[1] = "hello",
greeting[2] = "ciao",
greeting[3] = "welcome",
greeting[4] = "howdy",
greeting[5] = "greetings",
greeting[6] = "salut",
greeting[7] = "hallo",
greeting[8] = "hola",
greeting[9] = "Gday",
greeting[10] = "Hey",
document.getElementById("title").html = "greeting[randomCount]";
I am not sure how to a) trigger that code in the right place on my page, and b) What <script> type text to put around it.
Any help please?
Jon12345
11-28-2018, 10:44 AM
I got a solution now. All done!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.