JSFiddle - React, Tailwind, and code Playground

by rami7250

HTML

<div style="width: 300px;"><center>• • •</center></div>

JavaScript

var delay = 4000; //set delay between message change (in miliseconds)
var maxsteps=150; // number of steps to take to change from start color to endcolor
var stepdelay=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array (255,255,255); // start color (red, green, blue)
var endcolor=new Array(0,0,0); // end color (red, green, blue)
var fcontent=new Array();
begintag='<div style="font: normal 14px Arial; padding: 5px; ">'; //set opening tag, such as font declarations
fcontent[0]="<a style='text-decoration:none; color:black;' href='http://ebaysecrets.co.il'><strong>Good News</strong><br /><br />Get this fading scroller for your website its great. <br /><br />Copy the fading scroller code to your site then edit the text to what you want, the text fades out then a new text appears. Its easy to add to your site try it!!</a>";
fcontent[1]="<strong>Bad News</strong><br /><br />You can save space on your site by using our fading scroller, have as many fading messages as you want all in the fading scroller.<br /><br />Change the text size and text fade colours, add a background colour and lots more...";
fcontent[2]="<strong>Really good News</strong><br /><br />Write some text about one of the pages on your site then put a link after the text so visitors reading the text can then click the link.<br /><br /><a href='http://www.yourlinkhere.com/'><u>Click here</u></a>";
closetag='</div>';
var fwidth='300px'; //set scroller width
var fheight='250px'; //set scroller height
var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.
///No need to edit below this line/////////////////
var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;
/*Mike How To Create a Website*/
//function to change content
function changecontent(){
  if (index>=fcontent.length)
    index=0
  if (DOM2){
   ...