i want to animate a string of text taken from an html element using jquery:
<h1>Animate</h1>
for the jquery part:
$(document).ready(function() {
$( "h1" ).animate({ fontSize: "90px" }, 1500 )
.animate({ fontSize: "50px" }, 1500 );
});
this animates the whole h1 text value, however i want to animate each character in the h1 text.
the second jquery part:
$(document).ready(function () {
var animateChar = $("h1").text();
for(i=0; i<animateChar.length; i++) {
//alert(i + ': ' + animateChar.charAt(i));
// for every animateChar.charAt[i] want to run this
//jquery animation.
//$( "h1" ).animate({ fontSize: "90px" }, 1500 )
//.animate({ fontSize: "50px" }, 1500 );
}
});
this is the bit where im stuck. thanks
<span>. I guess you could do that first, then loop through them.