This Script Works in I.E., Opera, Google Chrome & Firefox. These are the only ones I have tested them in.

Script unchangables in Blue
Script changables in Red

Description: This script Blinks on & off. You can choose your font type and colour by creating a style. In this case it was done like this.

STEP 1.This is to Show & Style Your Chosen Text Message
<div id="blinkText" style='color:#ff0000; font-size: 40px; font-weight:bold; font-family: Times New Roman; text-align: center;'></div>

STEP 2. Place the Message that you want to display where you see the Text: Your Blinking Text Message this is at the bottom of the Script.

Important: If you want to add a second or more scripts on the same page as I have done in the heading table. You need to make sure that that these 5 things are changed in the each script the easiest way would be just add a number e.g. div id="blinkText2", function blinkText2, function blinkIt2, clearInterval(blinkIt2); blinkText("Your Message", "blinkText2");

<script>
// Makes text to blink and id of element to blink text in
function blinkText(text, id) {
// Changes the Blink interval the greater the number the slower
setInterval(blinkIt, 500);

// Flag to see if text state is true or false
var MyMessage = true;
var MyNum = 1;
var divID = document.getElementById(id);

// Number of times to blink text
function blinkIt() {
if (MyNum <
1000000) { // to set number of seconds to run - this is 11.57days
if (MyMessage) {
divID.innerHTML = text;
MyMessage = false;
}
// end if
else {
divID.innerHTML = "";
MyMessage = true;
}
//end else
MyNum++;
}
//end if one
else {
// Delete if it is still showing
divID.innerHTML = "";
// Stop blinking
clearInterval(blinkIt);
}
//end else
}
}// end function
blinkText("Your Blinking Text Message", "blinkText"); //The First is Your Message; Second is the Divison ID
</script>

To Select and Copy this JavaScript just left click in the text box and choose Select All in most Browsers this will select it, then (Ctrl + C) to Copy then use (Ctrl +V) to paste into in your document.

CU
May the God grant you peace throughout your life.
Blessings
Gary

 

 

BlueBar.gif


Visitor N° 



Free Text Counter.
Counter added 15/02/2014.

Top