Last active
March 31, 2016 14:19
-
-
Save hsleonis/92bb4e14907b34d350675abe389545a2 to your computer and use it in GitHub Desktop.
Animated window title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var strTitle = document.title, | |
| iIndex = 0; | |
| function animateTitle(){ | |
| document.title= strTitle.substring(iIndex, iIndex + 145); | |
| if(iIndex == strTitle.length-1){ iIndex = 0;} | |
| else iIndex++; | |
| setTimeout("animateTitle()",200); | |
| } | |
| animateTitle(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment