var text = "Welcome to ";
var logo = "Our Lo ";
var hook = "A tag line in smaller text below the logo...";
var hook2 = "We're almost ready to launch, Subscribe and be the first to know!";
var i = 0;
var j = 0;
var k = 0;
var l = 0;
var speed = 100;
function writeLogo() {
var currentLetter = logo.charAt(j);
j++;
$('.logo').append(currentLetter);
if (j == logo.length) {
clearInterval(timerLogo);
$('.EvelethLight').append('g');
setTimeout(function () {
$('.EvelethLight').append('o');
}, speed);
}
}
function writeLetter() {
var currentLetter = text.charAt(i);
i++;
$(".text").append(currentLetter);
if (i == text.length) {
clearInterval(timerId);
timerLogo();
}
}
function writeText() {
var currentLetter = hook.charAt(k);
k++;
$('.hook').append(currentLetter);
if (k == hook.length) {
clearInterval(timerText);
}
}
function writeHook() {
var currentLetter = hook2.charAt(l);
l++;
$('.hook2').append(currentLetter);
if (l == hook2.length) {
clearInterval(timerText);
}
}
var timerLogo = function() {
setInterval(writeLogo, speed);
};
var timerId = function () {
setInterval(writeLetter, speed);
};
var timerText = function () {
setInterval(writeText, 60);
};
var timerHook = function () {
setInterval(writeHook, 60);
}
var main = function() {
timerId();
setTimeout(function () {
timerText();
}, 2300);
setTimeout(function () {
$('.line1').animate({marginTop:'0'},'slow');
}, 6100);
setTimeout(function() {
timerHook();
}, 6500);
setTimeout(function () {
$('.subscribe').show('slow');
}, 10500);
}
$(document).ready(main);
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.