View index.html
<body> | |
<div class='preflex'> | |
</div> | |
<div class='flexContainer'> | |
<ul id ='home'> | |
<li><a href="">Home</a></li> | |
<li><a href="#about">About</a></li> | |
<li><a href="#projects">Projects</a></li> | |
<li><a href="#contact">Contact</a></li> | |
</ul> |
View Animate Text Jquery.js
$.fn.animateText = function(delay, klass) { | |
var text = this.text(); | |
var letters = text.split(''); | |
return this.each(function(){ | |
var $this = $(this); | |
$this.html(text.replace(/./g, '<span class="letter">$&</span>')); | |
$this.find('span.letter').each(function(i, el){ | |
setTimeout(function(){ $(el).addClass(klass); }, delay * i); | |
}); | |
}); |