Forumotion Tricks & Tips
Welcome To Forumotion Tricks & Tips!

Currently This Site Is New,Help Us Build It By Signing Up And Posting! =)

This Site Offers You The Ability To Post A Tutorial Forumotion Refused,Get Access To VIP,And Get Access To 1337 =)

HomeCalendarFAQSearchMemberlistUsergroupsRegisterLog in
Navigation
---------------------------------
List Of Templates Tutorials
---------------------------------
List Of CSS Tutorials
---------------------------------
List Of HTML Tutorials
---------------------------------
Other Tutorials
---------------------------------
Graphic Section
---------------------------------

Share | 
 

 Blinking Text

View previous topic View next topic Go down 
AuthorMessage
SC__Programmer
The Most Epic =)
The Most Epic =)

avatar

Posts : 50
Cash : 131
Rep : 5
Join date : 2011-07-05

PostSubject: Blinking Text   Tue Jul 05, 2011 2:12 pm

Javascript:
Code:

    var message="text"
    var neonbasecolor="color before"
    var neontextcolor="color after"
    var flashspeed="100"
    var n=0
    if (document.all||document.getElementById){
    document.write('')
    for (m=0;m<message.length;m++)
    document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
    document.write('')
    }
else
    document.write(message)
    function crossref(number){
    var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
    return crossobj
    }
    function neon(){
    if (n==0){
    for (m=0;m<message.length;m++)
    //eval("document.all.neonlight"+m).style.color=neonbasecolor
    crossref(m).style.color=neonbasecolor
    }
    crossref(n).style.color=neontextcolor
    if (n<message.length-1)
    n++
    else{
    n=0
    clearInterval(flashing)
    setTimeout("beginneon()",1500)
    return
    }
    }
    function beginneon(){
    if (document.all||document.getElementById)
    flashing=setInterval("neon()",flashspeed)
    }
    beginneon()

For HTML Use:
Code:

<script language="JavaScript">
    var message="text"
    var neonbasecolor="color before"
    var neontextcolor="color after"
    var flashspeed="100"
    var n=0
    if (document.all||document.getElementById){
    document.write('')
    for (m=0;m<message.length;m++)
    document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
    document.write('')
    }
else
    document.write(message)
    function crossref(number){
    var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
    return crossobj
    }
    function neon(){
    if (n==0){
    for (m=0;m<message.length;m++)
    //eval("document.all.neonlight"+m).style.color=neonbasecolor
    crossref(m).style.color=neonbasecolor
    }
    crossref(n).style.color=neontextcolor
    if (n<message.length-1)
    n++
    else{
    n=0
    clearInterval(flashing)
    setTimeout("beginneon()",1500)
    return
    }
    }
    function beginneon(){
    if (document.all||document.getElementById)
    flashing=setInterval("neon()",flashspeed)
    }
    beginneon()
</script>

Test: http://fmtricks.forumotion.com/h1-blinking-username
Back to top Go down
View user profile http://fmtricks.forumotion.com
 

Blinking Text

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Forumotion Tricks & Tips :: Javascript/jQuery :: Codes-

Affiliates: Free Domain Name | It'sYourSite | DevSchool | Your Website Here!
Free forum | © phpBB | Free forum support | Contact | Report an abuse | Free forum