[BBCode] 2Colors Blinking Text

Mods, snippets and styles postet and supported by the users
Forum rules
As the forum title says this is for User Contributions
Post a support request in this forum and you will be banned!
Locked
User avatar
all4phone
BBCoder IV
BBCoder IV
Posts: 150
Joined: 11 Feb 2011, 13:50
BBCodes: 28
Favourite BBCode: Random text signature
Favourite MOD: BBCode Strikethrough MOD
Location: Poland
Contact:

[BBCode] 2Colors Blinking Text

Post by all4phone »

BBCode Name: 2Colors Blinking Text
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]
HTML code:

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>
Help line:

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: Demo topic
Demo Username: tester
Demo Password: 123456
Last edited by all4phone on 18 Jan 2012, 21:57, edited 2 times in total.
master412160
BBCoder II
BBCoder II
Posts: 39
Joined: 04 Jun 2011, 14:17

[BBCode] 2Colors Blinking Text

Post by master412160 »

It works sweet!

Is it possible to add a third color?
Hello please check out my Interview Site, Interviewed You
Locked