Author: all4phone (js script - I do not remember where I found and who is the author of this script, I just adapted and use)
Description: This BBCode allows you to display blinking text in two chosen (by user) different colors. Also user can choose the time of blinking for each color.
Version: 0.0.2
Author Notes: Each bbcode must have a different id ({NUMBER1}) !
BBCode works in browsers such as: IE, Opera, FF, Chrome.
How to use BBCode:
Code: Select all
[blink={NUMBER1},{COLOR1},{NUMBER2},{COLOR2},{NUMBER3}]{INTTEXT}[/blink]
Code: Select all
<script type="text/javascript">
// <![CDATA[
function blink(id, color, time, color2, time2)
{
if (document.getElementById)
{
document.getElementById(id).style.color = color;
setTimeout('blink("' + id + '","' + color2 + '",' + time2 + ',"' + color + '",' + time + ')', time);
}
else if (document.all)
{
document.all[id].style.color = color;
setTimeout('blink("' + id + '","' + color2 + '",' + time2 + ',"' + color + '",' + time + ')', time);
}
}
// ]]>
</script>
<div id="blink{NUMBER1}">{INTTEXT}</div>
<script type="text/javascript">
// <![CDATA[
blink("blink{NUMBER1}", "{COLOR1}", {NUMBER2}, "{COLOR2}", {NUMBER3});
// ]]>
</script>
Code: Select all
[blink=ID,color1,time1,color2,time2]text[/blink]
Example:
Code: Select all
[blink=1,blue,2000,purple,2000]2Colors Blinking Text[/blink]
Demo Username: tester
Demo Password: 123456