Webmaster's Community

Designing and Development => Programming => Topic started by: Tayab on October 08, 2012, 01:43:28 AM

Title: Advertising - Animation on Title
Post by: Tayab on October 08, 2012, 01:43:28 AM
Good Morning everyone,
                                These days I am being working with editing on the JavaScripts and overall it's going fine. Yesterday, while browsing the internet I found an epic title animation website. It works by steps, having 7 steps in total. I've added all the credits in order of not stealing.

UPDATE:


Comments were added to the script in order to get easily, you should delete them in order to prevent the mess.

Code: [Select]
<SCRIPT>

//Arrow Head title- By Dynamic Drive
//Based on status bar script by Jason Rex (wonil4@hotmail.com, http://www.syred.net)
//Visit http://www.dynamicdrive.com for full source code

//change title text to your own
    var titletext="Test Title"
    var thetext=""
    var started=false
    var step=0
    var times=1

    function welcometext()
    {
      times--
      if (times==0)
      {
        if (started==false)
        {
          started = true;
          document.title = titletext;
          setTimeout("anim()",1);
        }
        thetext = titletext;
      }
    }

    function showstatustext(txt)
    {
      thetext = txt;
      setTimeout("welcometext()",4000)
      times++
    }
//Including steps and defining their work
    function anim()
    {
      step++
      if (step==7) {step=1}
      if (step==1) {document.title='>==='+thetext+'===<'}
      if (step==2) {document.title='=>=='+thetext+'==<='}
      if (step==3) {document.title='>=>='+thetext+'=<=<'}
      if (step==4) {document.title='=>=>'+thetext+'<=<='}
      if (step==5) {document.title='==>='+thetext+'=<=='}
      if (step==6) {document.title='===>'+thetext+'<==='}
      setTimeout("anim()",200);
    }
//Asking them to load the title
if (document.title)
window.onload=onload=welcometext
</SCRIPT>
Title: Re: Advertising - Animation on Title
Post by: Savera on October 08, 2012, 06:14:48 AM
It is great however, generally title animation doesn't look good in professional website but its cool for your hobby site etc.
Title: Re: Advertising - Animation on Title
Post by: Tayab on October 09, 2012, 11:46:19 AM
It could only be used for the index page for all. If suppose, someone is getting an epic offer to his website, he can also used animated text for title to add it's title too.  :)