diff --git a/_includes/header.html b/_includes/header.html index adaad5b6f7..bc0caeadc4 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -3,7 +3,8 @@

Your Favorite Source of Free Bootstrap Themes


-

Start Bootstrap can help you build better websites using the Bootstrap CSS framework! Just download your template and start going, no strings attached!

+

+
Find Out More
diff --git a/_includes/scripts.html b/_includes/scripts.html index 4e9635e23d..6434bad0fd 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -11,3 +11,6 @@ + + + \ No newline at end of file diff --git a/js/autoType.js b/js/autoType.js new file mode 100755 index 0000000000..1823d48616 --- /dev/null +++ b/js/autoType.js @@ -0,0 +1,25 @@ +var text = ["Start Bootstrap can help build better websites using the CSS framework!", + "Just download your template and start going, no strings attached!"]; // add more messages here! +var delay = 50; +var currentWord = 0; +var currentChar = 0; +var dest = document.getElementById("messages");; + +function type() { + dest.innerHTML = text[currentWord].substr(0, ++currentChar); + if (currentChar > text[currentWord].length) setTimeout("unType()", 2000); // delay before erasing message + else setTimeout("type()", delay); +} + +function unType() { + dest.innerHTML = text[currentWord].substr(0, currentChar); + if (--currentChar === 0) { + dest.innerHTML = "
"; // otherwise page will jump due to line deletion + if (currentWord + 1 === text.length) currentWord = 0; + else ++currentWord; + setTimeout("type()", 750); // delay before typing new message + } else setTimeout("unType()", delay/2); +} + +// delay typing for page to partially load +setTimeout("type()", 3000); \ No newline at end of file